quantile.survfitr: Quantiles of the survival time

View source: R/misc-methods.R

quantile.survfitrR Documentation

Quantiles of the survival time

Description

Returns, for each requested probability p, the first time at which the estimated survival function falls to 1 - p or below (so probs = 0.5 is the median survival time). NA is returned when the curve does not reach the requested level.

Usage

## S3 method for class 'survfitr'
quantile(x, probs = c(0.25, 0.5, 0.75), ...)

Arguments

x

a survfitr object.

probs

vector of probabilities.

...

ignored; kept for compatibility with the generic.

Value

A named vector of survival times, or a matrix with one row per group when the fit has strata.

See Also

q_search(), survfitr()

Examples

data(MMC)
fit <- survfitr(Survr(id, time, event) ~ group,
  data = MMC,
  type = "wang-chang"
)
quantile(fit, probs = c(0.25, 0.5, 0.75))

survrec documentation built on Sept. 22, 2026, 9:07 a.m.