BookmarkSubscribeRSS Feed
Juanjuan
Fluorite | Level 6

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?

 

  • In ProductLimitEstimates dataset, what's the difference with NumberAtRisk and Left?

 

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;

Capture1.PNG

 

  • And if we use the default survivalplot data, 
  • 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;
    Capture2.PNG

 

2 REPLIES 2
data_null__
Jade | Level 19

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.

Juanjuan
Fluorite | Level 6
Thanks for your response.

So the difference between NumberAtRisk and Atrisk are:

l Observations with tied WEEK values 6.28571, 8.42857 etc.(I know this difference).

l Observations added by survival(atrisk=0 to 10 by 2): I'm confused with this difference. I'm confused the rule to impute Atrisk for For the added week 4,6,10 which was not in NumberAtrisk.

Take Week4 for example, week4 is between week=2.42857/NumberAtRisk=15 and week=4.42857/ NumberAtRisk=14, so we should impute week=4 by 14 because of week=4 is closer to week=4.42857?

And how to handle with week=10?


[cid:image001.png@01D374ED.FE2F4BE0]
[cid:image002.png@01D374ED.FE2F4BE0]

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

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.

Discussion stats
  • 2 replies
  • 3005 views
  • 0 likes
  • 2 in conversation