turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Survival curve for competing risk

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-05-2016 06:39 PM - edited 12-06-2016 01:03 PM

Hello,

I want to plot a survival curve for competing risk but I cannot find out how it is implememted in SAS. I want survival curve S(t), not the cumullative infidence function. If anyone happen to know how to implement this, please let me know. Thank you very much!

Here is what I have tried:

(1) I tried "proc phreg"

data Risk;

group=0; output;

group=1; output;

run;

proc phreg data=mm(where=(time_to_event_year < 30)) plots(overlay=stratum)=survival;

class group(order=internal);* ref=first);

model time_to_event_year*death_status(0)=group / eventcode=1;

Hazardratio 'Pairwise' group / diff=pairwise;

baseline covariates=Risk out=out1 cif=_all_ / seed=191;

run;

I got an error message:

ERROR: Cannot request a SURVIVAL plot for the Fine and Gray competing-risks analysis.

(2) I also tried "proc lifetest"

proc lifetest data=mm(where=(time_to_event_year < 30)) plots=survival;

class group;

time time_to_event_year*death_status(0) / eventcode=1;

strata group / order=internal;

run;

Again, I got error message that "/ eventcode = 1" cannot be recoganized and ignored. However, when I checked the lifetest procedure, this is an option.

It would be great if anyone can help! Thanks again.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-05-2016 09:46 PM

Hi and welcome to the community!

In checking the SAS Stat User's Guide (Version 14.1), there isn't an / errorcode= option. The closest I see is error= but the only options are AALEN and DELTA.

If you have access to SAS ODS, I recommend using the SAS ODS Graphics Designer (See Example 6) as it assists you in building your graph and you can the save the code and modify it in your SAS Editor.

If you can provide the link to the documentation you were using, it would help (possibly an option that has since been deprecated?).

Good luck and post back what you find out!

Chris

Has my article or post helped? Please mark as Solution or Like the article!

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-05-2016 09:54 PM

Sorry - realised I misread eventcode as errorcode :-(

Having said that I can't seem to find anything about the event code option - I always use time*status(0), but I'm also not on expert and rely heavily on the SAS papers and the community

Please do post the reference you used as I'd like to read up on this option!

Chris

Having said that I can't seem to find anything about the event code option - I always use time*status(0), but I'm also not on expert and rely heavily on the SAS papers and the community

Please do post the reference you used as I'd like to read up on this option!

Chris

Has my article or post helped? Please mark as Solution or Like the article!

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-06-2016 01:50 AM

Eventcode = has a small section in the doc

EVENTCODE=number

FAILCODE=number

specifies the number that represents the event of interest for the competing-risks analysis of Fine and Gray (1999). For example:

model T*Status(0 1)= X1-X5 / eventcode=2;

This specifies that a subject whose Status value is 2 has the event of interest, a subject whose Status value is 0 or 1 is a censored observation, and a subject that has another value of the Status variable has a competing event.

@xlsemi135 If you don't get an answer soon, I would recommend searching lexjansen.com. I suspect this is a common request and it would have the code on how to achieve this.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-06-2016 01:55 AM

FYI - I suspect there's a methodological reason for not generating a survival curve, but using a CiF instead.

Unfortunately it's been 5 years since I last did survival analysis.

http://www.mwsug.org/proceedings/2016/RF/MWSUG-2016-RF01.pdf

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-06-2016 12:54 PM

When I googled competing risk survival analyses, CIF plots are generated and the surival plots are not mentioned. It would be great to know why survival function is not used for competing risk? It appears that the competing event can be adjusted by excluding them from the denominator?

If it would be greate if you can find the reference you are referrring to. Thanks.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-06-2016 06:34 AM

@Reeza I'm constantly impressed by your breadth and depth of knowledge. Always learning from you :-)

hope all is well and chat soon

Chris

Has my article or post helped? Please mark as Solution or Like the article!

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-06-2016 12:56 PM

Thanks for your kindly and timely response, but @Reeza 's post is more close to what I am looking for. I'm looking within the contents of competing risk survival analyses. Thanks again for your kindness.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-06-2016 01:02 PM

Thank you. Actually, I was not even able to reproduce the proc lifetest code in the document. I was able to use "eventcode=1" in the proc phreg procedure, but cannot get survival plot. I'll search lexjansen.com. Thank you for your help!

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-06-2016 02:44 PM

Survival plots are biased when you have competing risks, the CIF is used instead.

If you want survival plots regardless you may need to recode your data. Proc lifetest is non parametric and does not deal with competing risks AFAIK.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

12-06-2016 12:49 PM

That's OK. The time*status(0) is not for competing risk.

You can find this topic in the following page:

They used the following code in lifetest:

proc lifetest data=bmt plots=cif(test ); time Dftime*Status(0)/eventcode=1; strata Gender/group=Disease order=internal; format Disease diseaseLabel. Gender genderLabel.; run;