BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
fengyuwuzu
Pyrite | Level 9

I have a subgroup with only 2 patients. One patient had event and the other one censored. Since there are only two patients and one had event, the median survival time would be the when the patient had event - at that time, survival rate reached 50%.

 

However, the median survival from Proc Lifetest is missing, which means not reached. 

 

Does any one has an explanation on this? Below is a dummy data set and a simple program for testing. 

 

data test;
input id aval cnsr;
datalines;
1 2.4 0
2 3.9 1
;
run;

ods select none;
proc lifetest data=test;
ods output means = mean_surv quartiles= median_surv;
time aval * cnsr(1);
run;
ods select all;
1 ACCEPTED SOLUTION

Accepted Solutions
fengyuwuzu
Pyrite | Level 9

I contacted SAS tech support, and got the answer:

 

I think it's because your survival function never drops below 0.5 is why there is no median computed.

 

Just because half the patients have had an event doesn't mean the median has been reached.  It depends on the computed survival function.   The median is the first time at which the survival function goes below S(t) = 0.5.  

View solution in original post

3 REPLIES 3
fengyuwuzu
Pyrite | Level 9

I tried with 4 patients, 2 had events, and 2 censored later than event time. 

In this case, median survival is also missing. 

 

data test;
input id aval cnsr;
datalines;
1 2.4 0
2 3.4 0
3 4.2 1
4 5.4 1
;
run;
proc lifetest data=test method=km;
time aval * cnsr(1);
run;

6 patients, with half events and half censored, still the same. 

data test;
input id aval cnsr;
datalines;
1 2.4 0
2 3.4 0
3 4.2 0
4 5.4 1
5 5.5 1
6 6.0 1
;
run;
fengyuwuzu
Pyrite | Level 9

This is a general situation: if we have even number of patients, half of them had events first, and rest of them censored and censored time later than all event time, in this case, median survival will be missing (median not reached). 

Not sure how to explain this. 

fengyuwuzu
Pyrite | Level 9

I contacted SAS tech support, and got the answer:

 

I think it's because your survival function never drops below 0.5 is why there is no median computed.

 

Just because half the patients have had an event doesn't mean the median has been reached.  It depends on the computed survival function.   The median is the first time at which the survival function goes below S(t) = 0.5.  

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 3 replies
  • 552 views
  • 0 likes
  • 1 in conversation