quantile.survfit {RcmdrPlugin.survival} | R Documentation |
This methods computes quantiles for a survival function (or survival
functions by strata) as returned by survfit
.
Quantiles are computed conventionally as the last observed event time
before each requested quantile. Confidence intervals for the estimated
quantiles are obtained from the confidence limits of the etimated survival
function.
## S3 method for class 'survfit': quantile(x, quantiles = c(0.25, 0.5, 0.75), ...)
x |
a survfit object. |
quantiles |
quantiles to compute, default is 0.25, 0.5, and 0.75. |
... |
not used. |
A vector of quantiles (or a matrix, if there are strata).
John Fox <jfox@mcmaster.ca>
require(survival) quantile(survfit(Surv(time, status), data=cancer)) quantile(survfit(Surv(time, status) ~ sex, data=cancer))