01/20141 epi 5344: survival analysis in epidemiology sas code and output march 4, 2014 dr. n....

18
01/2014 1 EPI 5344: Survival Analysis in Epidemiology SAS code and output March 4, 2014 Dr. N. Birkett, Department of Epidemiology & Community Medicine, University of Ottawa

Upload: kory-bryan

Post on 05-Jan-2016

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 01/20141 EPI 5344: Survival Analysis in Epidemiology SAS code and output March 4, 2014 Dr. N. Birkett, Department of Epidemiology & Community Medicine,

01/2014 1

EPI 5344:Survival Analysis in

EpidemiologySAS code and output

March 4, 2014

Dr. N. Birkett,Department of Epidemiology & Community

Medicine,University of Ottawa

Page 2: 01/20141 EPI 5344: Survival Analysis in Epidemiology SAS code and output March 4, 2014 Dr. N. Birkett, Department of Epidemiology & Community Medicine,

Recidivism data set

• 432 male prison inmates from the early 1970’s

• Test of a financial support programme (RCT)

• Followed for 1 year post-release

• Data collected weekly

• Primary outcome– re-arrest (recidivism)

• 26% re-arrested

• Data includes– financial aid group

– age

– race

– # prior arrests

– parole status

01/2014 2

Page 3: 01/20141 EPI 5344: Survival Analysis in Epidemiology SAS code and output March 4, 2014 Dr. N. Birkett, Department of Epidemiology & Community Medicine,

01/2014 3

Obs week arrest fin age race wex mar paro prio

1 20 1 0 27 1 0 0 1 32 17 1 0 18 1 0 0 1 83 25 1 0 19 0 1 0 1 134 52 0 1 23 1 1 1 1 15 52 0 0 19 0 1 0 1 36 52 0 0 24 1 1 0 0 27 23 1 0 25 1 1 1 1 08 52 0 1 21 1 1 0 1 49 52 0 0 22 1 0 0 0 610 52 0 0 20 1 1 0 0 011 52 0 1 26 1 0 0 1 312 52 0 0 40 1 1 0 0 213 37 1 0 17 1 1 0 1 514 52 0 0 37 1 1 0 0 215 25 1 0 20 1 0 0 1 316 46 1 1 22 1 1 0 1 217 28 1 0 19 1 0 0 0 718 52 0 0 20 1 0 0 0 219 52 0 0 25 1 0 0 1 1220 52 0 0 24 0 1 0 1 1

Recidivism data (first 20 cases)

Page 4: 01/20141 EPI 5344: Survival Analysis in Epidemiology SAS code and output March 4, 2014 Dr. N. Birkett, Department of Epidemiology & Community Medicine,

01/2014 4

ODS GRAPHICS ON;ODS RTF;

PROC LIFETEST DATA=allison.recid PLOTS=S(test atrisk)

TIMELIST=1 to 52; TIME week*arrest(0); strata fin/tests=all;RUN;

ODS RTF close;ODS GRAPHICS OFF;

Page 5: 01/20141 EPI 5344: Survival Analysis in Epidemiology SAS code and output March 4, 2014 Dr. N. Birkett, Department of Epidemiology & Community Medicine,

01/2014 5

Page 6: 01/20141 EPI 5344: Survival Analysis in Epidemiology SAS code and output March 4, 2014 Dr. N. Birkett, Department of Epidemiology & Community Medicine,

01/2014 6

Page 7: 01/20141 EPI 5344: Survival Analysis in Epidemiology SAS code and output March 4, 2014 Dr. N. Birkett, Department of Epidemiology & Community Medicine,

01/2014 7

Page 8: 01/20141 EPI 5344: Survival Analysis in Epidemiology SAS code and output March 4, 2014 Dr. N. Birkett, Department of Epidemiology & Community Medicine,

01/2014 8

Page 9: 01/20141 EPI 5344: Survival Analysis in Epidemiology SAS code and output March 4, 2014 Dr. N. Birkett, Department of Epidemiology & Community Medicine,

01/2014 9

Page 10: 01/20141 EPI 5344: Survival Analysis in Epidemiology SAS code and output March 4, 2014 Dr. N. Birkett, Department of Epidemiology & Community Medicine,

01/2014 10

Page 11: 01/20141 EPI 5344: Survival Analysis in Epidemiology SAS code and output March 4, 2014 Dr. N. Birkett, Department of Epidemiology & Community Medicine,

01/2014 11

Page 12: 01/20141 EPI 5344: Survival Analysis in Epidemiology SAS code and output March 4, 2014 Dr. N. Birkett, Department of Epidemiology & Community Medicine,

01/2014 12

ODS GRAPHICS ON;ODS RTF;

PROC LIFETEST DATA=allison.recid; TIME week*arrest(0); STRATA age(21 24 28);RUN;

ODS RTF close;ODS GRAPHICS OFF;

Page 13: 01/20141 EPI 5344: Survival Analysis in Epidemiology SAS code and output March 4, 2014 Dr. N. Birkett, Department of Epidemiology & Community Medicine,

01/2014 13

Page 14: 01/20141 EPI 5344: Survival Analysis in Epidemiology SAS code and output March 4, 2014 Dr. N. Birkett, Department of Epidemiology & Community Medicine,

01/2014 14

Page 15: 01/20141 EPI 5344: Survival Analysis in Epidemiology SAS code and output March 4, 2014 Dr. N. Birkett, Department of Epidemiology & Community Medicine,

01/2014 15

ODS GRAPHICS ON;ODS RTF;

PROC LIFETEST DATA=allison.recid; TIME week*arrest(0); TEST fin age race wexp mar paro prio;RUN;

ODS RTF close;ODS GRAPHICS OFF;

Page 16: 01/20141 EPI 5344: Survival Analysis in Epidemiology SAS code and output March 4, 2014 Dr. N. Birkett, Department of Epidemiology & Community Medicine,

01/2014 16

Page 17: 01/20141 EPI 5344: Survival Analysis in Epidemiology SAS code and output March 4, 2014 Dr. N. Birkett, Department of Epidemiology & Community Medicine,

01/2014 17

Page 18: 01/20141 EPI 5344: Survival Analysis in Epidemiology SAS code and output March 4, 2014 Dr. N. Birkett, Department of Epidemiology & Community Medicine,

01/2014 18