Hi
I am trying to perform competing risk analysis for outcomes using a patient cohort data on SAS studio release 9.04. I checked codes on line and found that we could use proc phreg or %macro cuminc. I am planning on using proc phreg using these codes on sas support site
ods graphics on; proc phreg data=Bmt plots(overlay=stratum)=cif; class Disease (order=internal ref=first); model T*Status(0)=Disease / eventcode=1; Hazardratio 'Pairwise' Disease / diff=pairwise; baseline covariates=Risk out=out1 cif=_all_ / seed=191; run;
My question is how do I code so that the graph shows all outcome status. This code only plots for the outcome of interest (eventcode =1). Thanks
You can not calculate all the survival curves in only one run of phreg. You can of course run phreg for each outcome. The Fine and Gray method which proc phreg use only take account for one outcome at a time.
I am not sure that if you run phreg for each outcome that the total sum will add up to one (exactly).
If you like, I can give you a macro which calculate all curves in one time using the Aalen Johansen estimator.
Here you have the program that calculate Aalen Johansen estimates. It was not written as a macro, so bit editing will perhaps be neccessary. I hope you find it useful.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.