plotEstimators: Compare the three survival estimators on the same data

View source: R/autoplot.survfitr.R

plotEstimatorsR Documentation

Compare the three survival estimators on the same data

Description

Fits the Peña-Strawderman-Hollander, the Wang-Chang and the gamma frailty MLE estimators to the same sample and draws the three curves on the same axes. Agreement between the PSH and the frailty estimates suggests independent inter-occurrence times, while a Wang-Chang curve separated from the PSH one points to within-subject correlation.

Usage

plotEstimators(x, conf.int = FALSE, level = 0.95, alpha.console = FALSE, ...)

Arguments

x

a survival recurrent event object, see Survr().

conf.int

draw the pointwise confidence bands of the estimators that provide them? Default FALSE.

level

confidence level of the bands.

alpha.console

passed to mlefrailty_fit(); default FALSE.

...

additional arguments passed to the three fitting functions.

Value

A ggplot object.

See Also

autoplot.survfitr(), psh_fit(), wc_fit(), mlefrailty_fit()

Examples

data(MMC)
plotEstimators(Survr(MMC$id, MMC$time, MMC$event))

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