q_search: Survival time of a selected quantile

View source: R/search.R

q_searchR Documentation

Description

Given a survfitr object, returns the first time at which the estimated survival function falls to the quantile q or below.

Usage

q_search(f, q = 0.5)

Arguments

f

a survfitr object.

q

quantile. Default is 0.5 (the median survival time).

Value

The survival time of the selected quantile, or NA (with a warning) when the survival estimates are not available.

Examples

data(MMC)
fit <- survfitr(Survr(id, time, event) ~ 1, data = MMC)

# 75th percentile of the survival function
q_search(fit, q = 0.75)

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