[R] median survival
Therneau, Terry M., Ph.D.
therneau at mayo.edu
Wed Jan 29 15:56:42 CET 2014
Actually, it's worse than you think.
Ideal: if the survival curve has a horizontal segment at exactly 50%, report the midpoint
of that segment.
For uncensored data, this makes the routine agree with the ordinary definition of a median.
Reality: The survfit routine tries for this. However, due to round-off error the
horizontal segment that is at exactly .5 may be computed as .500000001 or .4999999999...
In the first case you will get the right endpoint of the segment and in the second case
the left endpoint.
There is nothing I can do to fix this. For uncensored data of size 100 the KM is 1,
99/100, (99/100) * (98/99), (99/100)*(98/99)*(97/98), .... Many of those fractions do
not have an exact binary representation. Welcome to the world of floating point.
--- begin included message ---
Hi, if 50% survival probability horizontal line in a Kaplan-Meier survival curve overlap
one of the step line between 2 time points t1 and t2, the survfit() from survival package
estimates median survival as t2 (the longest time point). But I saw some articles (page
recommend the smallest time t such time S(t)<=0.5.?
What is the convention for the definition of median survival?
-- end inclusion ---
More information about the R-help