BookmarkSubscribeRSS Feed
yiyizhao86
Calcite | Level 5

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. 

2 REPLIES 2
Jagadishkatam
Amethyst | Level 16
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 ;
Thanks,
Jag
yiyizhao86
Calcite | Level 5
Hi Jag, thank you for your answer! Sorry that I made it look confusing - "event" is what we are actually interested in and "death" is just a competing event.

Therefore, the censored flag should contain three values - one for event, one for competing event and one for censoring. Otherwise, there will be no way to differentiate an event from a competing event if we use a binary "cnsr".

SAS Innovate 2025: Register Now

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!

What is ANOVA?

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.

Discussion stats
  • 2 replies
  • 2110 views
  • 0 likes
  • 2 in conversation