/* K-M Curve for All Patients*/
ods graphics on / width = 6 in height = in border = off ;
ods graphics on/ imagefmt = tiff imagename = "Figure_AKI" reset = index;
ods listing image_dpi = 300 style = axis_wall style=StatColor;
proc lifetest data=one_a plots=survival(test atrisk =0 to 15 by 2.5)
/* ods select SurvivalPlot;*/
outsur=survival2;
time Survive_year*death(0);
label Survive_year='Time (Years)';
/*title 'Time to Death'*/;
strata AKI;
ods output SurvivalPlot = graph;
run;
ods graphics off;
That's not really the purpose of KM curves. In time-to-event analysis, the outcome measure is TIME to event. Not the % of subjects with event. If you want to compare % of subjects who survive to 5-years, then you cannot have any censored observations through 5-years, and then you can use chi-square or Fisher exact test.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.