The kth quantile for a survival curve S(t) is the location at which
a horizontal line at height p= 1-k intersects the plot of S(t).
Since S(t) is a step function, it is possible for the curve to have a
horizontal segment at exactly 1-k, in which case the midpoint of the
horizontal segment is returned. This mirrors the standard behavior of
the median when data is uncensored. If the survival curve does not
fall to 1-k, then that quantile is undefined.
In order to be consistent with other quantile functions, the argument
prob
of this function applies to the cumulative distribution
function F(t) = 1-S(t).
Confidence limits for the values are based on the intersection of the
horizontal line at 1-k with the upper and lower limits for the
survival curve. Hence confidence limits use the same
p-value as was in effect when the curve was created, and will differ
depending on the conf.type
option of survfit
.
If the survival curves have no confidence bands, confidence limits for
the quantiles are not available.
When a horizontal segment of the survival curve exactly matches one of
the requested quantiles the returned value will be the midpoint of the
horizontal segment; this agrees with the usual definition of a median
for uncensored data. Since the survival curve is computed as a series
of products, however, there may be round off error.
Assume for instance a sample of size 20 with no tied times and no
censoring. The survival curve after the 10th death is
(19/20)(18/19)(17/18) ... (10/11) = 10/20, but the computed result will
not be exactly 0.5. Any horizontal segment whose absolute difference
with a requested percentile is less than tolerance
is
considered to be an exact match.