SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
SeaMoon_168
Quartz | Level 8

I want to find a KM rate at 90 days. so I used

proc lifetest data=testdata timlist=90;
time day*censor(0);
strata group;
run;

However, I found the timelist and the day are different. Could you help me figure out why there is a gap between these two? If I do really want to find the km rate at day 90, how to set up the options of proc lifetest?

 

 

Many thanks!

2 REPLIES 2
FreelanceReinh
Jade | Level 19

Hello @SeaMoon_168,

 

If a value T in the TIMELIST= option is not one of the observed survival times, the second column ("day" in your example) will contain the most recent event time before T in the same stratum (group in your example) -- or zero if there is none. The values in columns "Survival", "Failure" and "Survival Standard Error" correspond to that most recent event time, whereas the values in columns "Number Failed" and "Number Left" correspond to the most recent survival time before T (again, in the same stratum), which includes censored survival times, if any.

 


@SeaMoon_168 wrote:

If I do really want to find the km rate at day 90, how to set up the options of proc lifetest?


You get the correct Kaplan-Meier estimate with this option because of the definition of the Kaplan-Meier estimator as a step function.

Ksharp
Super User

As Freelance said there are not K-M estimator between "timelist and the day".

Your original code could you right result.

 

Ksharp_0-1713593469556.png

 

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 840 views
  • 0 likes
  • 3 in conversation