/* 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.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.