The restricted mean survival time (RMST) to a horizon tau: the area under
the survival curve on [0, tau], which is defined when the median is not
reached. Parametric, spline and cure fits use
flexsurv's RMST; its standard error and interval come from 1000 draws of the
parameters from their asymptotic normal distribution, seeded by seed.
Cox-family and non-parametric fits use the area under survival::survfit()
with its standard error.
Arguments
- fit
A sest_fit of kind
"parametric","spline","cure","cox"or"nonparametric". Frailty, interval-censored, competing-risk and recurrent-event fits, and Cox fits with a(start, stop]response, have no single survival curve and are refused.- tau
Numeric horizon (a single positive time) the mean is restricted to. A horizon past the last observed time (in any group, for a Kaplan-Meier fit with groups) is refused.
- newdata
A data frame of covariate profiles for the model-based fits. The default is one profile at the means of the covariates: a numeric 1/2 arm is set to 1.5, and a factor enters through the means of its indicator columns. Give
newdatafor a profile that exists.- seed
Integer seed for the simulated interval of parametric, spline and cure fits. The caller's random-number state is restored.
- conf_level
Confidence level of the interval.
Value
A data frame with tau, profile (the row of newdata, or the
group of a Kaplan-Meier fit), group (the group label of a Kaplan-Meier
fit with groups, otherwise NA), rmst, se, conf_low and
conf_high. The interval of a parametric, spline or cure fit is the
percentile interval of the simulated restricted means; that of a Cox or
Kaplan-Meier fit is the normal interval from the standard error.
Details
$$RMST(\tau) = \int_0^{\tau} S(t)\,dt$$ where \(S(t)\) is the (model-based or Kaplan-Meier) survival function. Restricting the integral to \([0, \tau]\) keeps the summary defined and identifiable from the observed follow-up even when the survival curve never crosses one-half.
See also
sest_curve() for the curve the mean integrates.
Other model-fitting:
is_sest_refusal(),
sest_cuminc(),
sest_ic(),
sest_power(),
sest_refusal(),
sest_score(),
sest_stack(),
survestimand()
Examples
fit <- survestimand(survival::Surv(time, status) ~ 1, survival::lung, method = "km")
sest_rmst(fit, tau = 365)
#> tau profile group rmst se conf_low conf_high
#> 1 365 1 <NA> 263.2219 7.798859 247.9364 278.5073
