- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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 ;
Jag
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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".