This is a generic method for estimating marginal survival functions by levels of a stratification variable (typically treatment vs. control).
marginal_survival(object, ...) # S3 method for psweight marginal_survival(object, formula, times = NULL, ...) # S3 method for psweight_mi marginal_survival(object, formula, times = NULL, ...) # S3 method for survfit marginal_survival(object, times = NULL, ...)
| object | An object of the appropriate class. |
|---|---|
| ... | Currently unused. |
| formula | A |
| times | Unique times to compute survival probabilities at. |
An object of class marginal_survival, which is a
dplyr::tibble containing the following columns:
strata}The name of the stratification variable. This will be the same as the name of the variable supplied by the user.
timeThe time at which survival was evaluated.
survThe survival probability.