survfitr: Survival curves for recurrent event data

View source: R/survfitr.R

survfitrR Documentation

Survival curves for recurrent event data

Description

Computes an estimate of the survival curve of inter-occurrence times for recurrent event data, optionally by group, using the Peña-Strawderman-Hollander, the Wang-Chang or the gamma frailty MLE estimators, together with their standard errors.

Usage

survfitr(formula, data, type = "MLEfrailty", ...)

Arguments

formula

a formula object with a Survr() object as the response on the left of the ~ operator and a grouping term on the right. For a single survival curve use ~ 1.

data

a data frame in which to interpret the variables named in the formula.

type

a character string specifying the estimator: "pena-strawderman-hollander", "wang-chang" or "MLEfrailty" (default). Only the first letters are required, e.g. "pe", "wa", "ML".

...

additional arguments passed to the fitting function of the chosen estimator.

Details

See psh_fit(), wc_fit() and mlefrailty_fit() for details on each estimator; additional arguments in ... are passed to the chosen fitting function.

Value

A survfitr object: the fit of the chosen estimator, or a named list with one fit per group when the formula defines groups. Methods are provided for print, plot, lines and summary.

References

Peña, E.A., Strawderman, R. and Hollander, M. (2001). Nonparametric Estimation with Recurrent Event Data. Journal of the American Statistical Association 96, 1299–1315.

Wang, M.-C. and Chang, S.-H. (1999). Nonparametric Estimation of a Recurrent Survival Function. Journal of the American Statistical Association 94, 146–153.

See Also

print.survfitr(), plot.survfitr(), summary.survfitr(), Survr(), psh_fit(), wc_fit(), mlefrailty_fit()

Examples

data(colon)
# fit a Peña-Strawderman-Hollander estimator by Dukes stage
fit <- survfitr(Survr(hc, time, event) ~ as.factor(dukes),
  data = colon, type = "pena"
)
plot(fit, ylim = c(0, 1), xlim = c(0, 2000))
fit
summary(fit)

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