BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
djrisks
Barite | Level 11

Hello,

Do you know why the atrisk numbers are different on a survival curve compared to the atrisk numbers that are in the ods ProductLimitEstimates dataset in the NumberAtRisk column? It seems like the atrisk numbers on the survival curve correspond to the Left column (Number Left) in the ods ProductLimitEstimates dataset? Can you help please?

Many thanks,

Kriss Harris Smiley Happy

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

You can generate the source code for the graph and see it references the ATRISK, check the log...

ods trace on;

ods output ProductLimitEstimates = surv;

proc lifetest data=sashelp.BMT plots=survival(atrisk=0 to 2500 by 500) atrisk timelist = 0 to 2500 by 500;

   time T * Status(0);

   strata Group / test=logrank adjust=sidak;

run;

ods trace off;

proc template;

source Stat.Lifetest.Graphics.ProductLimitSurvival;

run;quit;

View solution in original post

9 REPLIES 9
Reeza
Super User

Can you post some sample data with this issue?

djrisks
Barite | Level 11

Okay, I will create some. Thanks.

djrisks
Barite | Level 11

SurvivalPlot91.png
Hi Reeza,

Here is the sample code:

ods output ProductLimitEstimates = out.surv;

proc lifetest data=sashelp.BMT plots=survival(atrisk=0 to 2500 by 500) atrisk timelist = 0 to 2500 by 500;

   time T * Status(0);

   strata Group / test=logrank adjust=sidak;

run;

I can't attach the dataset at the moment, but you will see what I mean when you run the program and compare the Left Column with the NumberAtRisk column and then also compare them to the graph.

Thanks.


Reeza
Super User

For the code I ran, number at risk=number left because there are no ties or multiple occurrences with censors at the same time in this data.

The number left = number at risk seems to make sense intuitively to me except possibly when a censored and event occur at the same time?

djrisks
Barite | Level 11

Okay thank you. Do you know which Atrisk values we should be using please when there are differences between number at risk and number left?

Reeza
Super User

You can generate the source code for the graph and see it references the ATRISK, check the log...

ods trace on;

ods output ProductLimitEstimates = surv;

proc lifetest data=sashelp.BMT plots=survival(atrisk=0 to 2500 by 500) atrisk timelist = 0 to 2500 by 500;

   time T * Status(0);

   strata Group / test=logrank adjust=sidak;

run;

ods trace off;

proc template;

source Stat.Lifetest.Graphics.ProductLimitSurvival;

run;quit;

djrisks
Barite | Level 11

Thank you for this Reeza, I'll check.

djrisks
Barite | Level 11

Hi Reeza,

Thank you for helping out with this. I've just gone back to it, and I can see that the template does reference the ATRISK number. I wonder why the plot uses the Left column then?

djrisks
Barite | Level 11

From reading Jack Shostak's book, I've seen that a solution to the question mentioned above is to output the "survivalplot" dataset.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 9 replies
  • 12230 views
  • 4 likes
  • 2 in conversation