Dear, I met an issue in Proc Lifetest that confused me for a long time. I want to create the survival plot with GTL which need the survival rate and the number at risk.
But for number at risk, there are two versions, one is the NumberAtRisk in ProductLimitEstimate, the other is the AtRisk in survivalplot. I know we should use the AtRisk in survivalplot, but I want to know why they are different? And what's the difference between NumberAtRisk and Left in ProductLimitEstimates?
proc lifetest data=adsl method=km alpha=0.05 atrisk;
time week*lvcens(1);
strata armn/*/test=logrank adjust=sidak*/;
ods output ProductLimitEstimates=ple;
run;
ods graphics on;
ods output survivalplot=plotdata;
proc lifetest data=adsl plots=survival(atrisk=0 to 10 by 2);
time week*lvcens(1);
strata armn/*/test=logrank adjust=sidak*/;
ods output ProductLimitEstimates=ple;
run;
ods graphics off;
Can you be more specific about the difference you are concerned about? The only significant difference I see are the observations added by survival(atrisk=0 to 10 by 2) and the way atrisk is handled for observations with tied WEEK values 6.28571, 8.42857 etc.
LEFT is the number of observations left.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.