Fluorite | Level 6

## proc lifetest- Left vs. NumberAtRisk vs. Atrisk

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);
ods output ProductLimitEstimates=ple;
run;``````

• 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);
ods output ProductLimitEstimates=ple;
run;
ods graphics off;``````

2 REPLIES 2

## Re: proc lifetest- Left vs. NumberAtRisk vs. Atrisk

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.

Fluorite | Level 6

## Re: proc lifetest- Left vs. NumberAtRisk vs. Atrisk

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]
Discussion stats
• 2 replies
• 2996 views
• 0 likes
• 2 in conversation