# Median survival in Kaplan-Meier curve with plateau at .5

Given a survival curve, to find the median one can visualize a line at 0.5 and then find the time at which the survival curve intersects with the line. But what if the Kaplan-Meier curve is horizontal at S(t)=0.5?

I´ve tried to come up with the solution by thinking of S(M)=0.5 and solving that equation for M. but it does not make sense to me. Is it possible to find an exact time point for the median survival, or will I get an interval?

• Can you post a small example dataset for people to work with? Commented Nov 12, 2020 at 14:53
• I´m not working with data, its more or less a conceptual question. I've tried to find a K-M-Curve showing this behavior, here's the one I found on the internet which resembles my problem, (the green line) miro.medium.com/max/700/1*ATbW_NU5GMtTaCCPpfkzEA.png Commented Nov 12, 2020 at 15:13

The median survival time is generally may be defined1 as the shortest time at which the proportion surviving is $$\le .5$$ (for a more comprehensive overview, see: Finding median survival time from survival function). You need the Kaplan-Meier estimator to account for censoring correctly, but when you have that, you can read the median off the curve. Here is an example, coded in R:

library(survival)  # we'll need this package
times  = c( 1,  2,  3,  5,  7,  9, 12, 15, 19, 22,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34 )
events = c( 1,  1,  1,  1,  1,  1,  1,  1,  1,  1,
0,  0,  0,  0,  0,  0,  0,  0,  0,  0 )

windows()  # the KM plot
plot(Surv(times, events), conf.int=FALSE, mark.time=TRUE,
yaxp=c(0,1,4), ylab="proportion surviving", xlab="days")
segments(x0=-2, x1=22, y0=.5,   col="gray")
segments(x0=34, x1=36, y0=.5,   col="gray")
arrows(  x0=22, y0=.5, y1=-.04, col="gray", length=.1)


50% survive at least 22 days, so that's the median survival time. If you like, you can get R to compute it for you. Notice that the survival time is computed, as is the lower bound of a 95% confidence interval on the median survival time, but the upper bound cannot be computed in this case.

survfit(Surv(times, events)~1)
# Call: survfit(formula = Surv(times, events) ~ 1)
#
#       n  events  median 0.95LCL 0.95UCL
#      20      10      22      12      NA


Although it's a much more advanced topic, you may wonder why the survival times are all censored after a certain point. It could be there there are two different processes at work, such that there is one distribution of survival times for some patients, and the other proportion may well die of something someday, but will never die of the cause under study. This phenomenon is the focus of cure rate models.

1. Another possibility is to define it as the time of the midpoint between the two middle events, if an even number.

• Thank you so much!! That is really helpful! Commented Nov 14, 2020 at 6:34
• You're welcome, @Lillys. Commented Nov 14, 2020 at 6:51
• If one changes for example the event at time 26 from 0 to 1, the median becomes 24. I guess that is due to having $S(t)=0.5$ on the valid interval $[22;26]$ instead of $[22;\infty]$. Could you maybe extend your answer to this case? I would appreciate it :) Commented Jan 17, 2022 at 19:56