Hello Community,
I am a graduate student, I'm trying to figure out... what is wrong with my syntax... I went to the sas support page and I still can't get it to work...
Do I need a small modification to the following proc life test code or do i need to use a macro of some sort?
Below is my code from a book ( no names and identifiable information)
The first column I coded 1=Partial Remission and 2=Complete Remission, second column is time to relapse, and third column, 0= censored observations
From the log it appears there is an issue with the command kernel which I need to estimate a hazard rate with band wind=6 months using a uniform kernel, I need to do the same for biweight.
data Q1;
input res t rel ;
datalines;
1 10 1
1 6 1
1 20 0
1 35 0
1 6 1
2 7 1
2 32 0
2 23 1
2 22 1
2 16 1
2 34 0
2 32 0
2 25 0
2 11 0
2 19 0
2 6 1
2 17 0
2 13 1
2 9 0
2 6 0
2 10 0
;
run;
proc lifetest data=Q1 (where=(rel=1))plots=hazard(bw=6) aalen kernel=U outtest=test;
time t*rel(0);
run;
I think the (where=(rel=1)) in the PROC LIFETEST code is subsetting your Q1 dataset. Try running without it. The following worked for me:
proc lifetest data=q1 nelson plots=(hazard(bw=6 kernel=U)) outest=test;
time t*rel(0);
run;
Note some rearrangement in the plots= option and a substitution (nelson for aalen)
Steve Denham
Message was edited by: Steve Denham
I think the (where=(rel=1)) in the PROC LIFETEST code is subsetting your Q1 dataset. Try running without it. The following worked for me:
proc lifetest data=q1 nelson plots=(hazard(bw=6 kernel=U)) outest=test;
time t*rel(0);
run;
Note some rearrangement in the plots= option and a substitution (nelson for aalen)
Steve Denham
Message was edited by: Steve Denham
It's funny I just got it to run before I read your response, I didn't include kernel in the parentheses. Thank you Steve! I will omit the where statement since I don't want to subset the data.
Thank you for your swift assistance!
Very grateful Graduate student,
Jennifer Garcia
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for: