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 ;
Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.
Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.
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.