Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Re: median survival not reached in proc lifetest when there are only 2...

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

☑ This topic is **solved**.
Need further help from the community? Please
sign in and ask a **new** question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 01-31-2023 09:31 PM
(550 views)

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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.

3 REPLIES 3

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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;
```

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

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.

**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.

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.