Hi there,
I have a question about how to apply PROC LIFETEST to compute Cumulative Incidence with competing events. Death is an competing event. Here is my code (0 is event, 1 is death, 2 is censored):
proc lifetest data=test method=km timelist=(0,1,2,6,12,18,24,48) outsurv=kmest reduceout ;
time t*event(2)/failcode = 0;
strata trt / test=logrank ;
run ;
But I always get an error message like this (I think it implies that "/failcode" is wrong):
200 time t*event(2)/failcode = 0;
-
22
200
ERROR 22-322: Expecting ;.
ERROR 200-322: The symbol is not recognized and will be ignored.
Is it because I am using SAS/STAT 13.2 but not 14.1? Is there other ways that I can compute the cumulative incidence and CI while specifying "timelist=(0,1,2,6,12,18,24,48)"? Thank you so much! I really appreciate it.
Update the dataset as below
data have;
set test;
if event=0 then cnsr=1;
else if death=1 then cnsr=0;
else cnsr=1;
run;
proc lifetest data=have method=km plots=cif(test) timelist=(0,1,2,6,12,18,24,48) outsurv=kmest reduceout ;
time t*cnsr(1)/eventcode = 0;
strata trt / test=logrank ;
run ;
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.