BookmarkSubscribeRSS Feed
Li17
Calcite | Level 5

Hello everyone,

 

I am new here and I am working on a project where I need to produce KM survival plots, which not only provide the number of patients at risk at specific time-points in a table below the graph but, in addition, I need to provide the number of events, which happend up to these timepoints.

 

I use the following code to produce the number of people at risk at the time points 0, 200, ... 1000 but I have no idea how I can add the number of events that happened at the same time-points. I know how I could add an additional  table with the total number of events during follow-up, but I need to add the more detailed information for the specific time-points. Does anybody know how I can add this?

 

    proc lifetest data=one plots=s(atrisk(outside(0.15))=0 to 1000 by 200); time totexp1 * outexp(0); run;

 

Thank you very much in advance.

 

Best regards,

Li

 

4 REPLIES 4
RW9
Diamond | Level 26 RW9
Diamond | Level 26

You may be better off taking the output from lifetest and then running that (or doing it directly in) GTL.  Then you can plot whatever data you want, for example these posts may help:

http://blogs.sas.com/content/graphicallyspeaking/2014/02/09/survival-plot/

http://blogs.sas.com/content/graphicallyspeaking/2011/11/28/survival-plot-with-external-at-risk-tabl...

 

Illustrates plotting lifetest outputs with other information below.

Li17
Calcite | Level 5

Thank you for the advice. I'll try that.

XG
Calcite | Level 5 XG
Calcite | Level 5

Hi Li, how are you. I ran into the same questions and wondering if you solve this problem and could you share your solution/code?

 

Thank you very much!

Reeza
Super User

Something like the data in this chart?

https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.4/statug/statug_lifetest_examples02.htm

 

FYI - responding to an almost 6 year old thread isn't super useful. It's better to start your own thread. 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 4 replies
  • 3279 views
  • 0 likes
  • 4 in conversation