plot.survfitr: Plot survival curves of recurrent event data

View source: R/methods.survfitr.R

plot.survfitrR Documentation

Plot survival curves of recurrent event data

Description

Plots the estimated survival (or probability) function from a survfitr object, one curve per group when the fit has strata. Additional fits can be added to the same axes with the lines method.

Usage

## S3 method for class 'survfitr'
plot(x, conf.int = TRUE, prob = FALSE, ...)

## S3 method for class 'survfitr'
lines(x, prob = FALSE, ...)

Arguments

x

an object of class survfitr (output of survfitr(), psh_fit(), wc_fit() or mlefrailty_fit()).

conf.int

if TRUE (default), pointwise 95\ are drawn for the estimators that provide standard errors.

prob

if TRUE the probability function (1 - survival) is drawn instead of the survival function.

...

additional arguments passed to plot().

Value

No return value; called for its side effect.

See Also

psh_fit(), wc_fit(), mlefrailty_fit()

Examples

data(MMC)
fit <- survfitr(Survr(id, time, event) ~ group,
  data = MMC,
  type = "wang-chang"
)
plot(fit)

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