Plot the mean cumulative function (MCF) for an
The usage of the function is similar to that of
plot.Recur() but with more flexible options.
plotMCF( formula, data, adjrisk = TRUE, onePanel = FALSE, smooth = FALSE, control = list(), ... )
a formula object, with the response on the left of a "~" operator, and the predictors on the right.
The response must be a recurrent event survival object returned by the
an optional data frame in which to interpret the variables occurring in the "
an optional logical value that is passed to the
an optional logical value indicating whether the mean cumulative functions will be plotted in the same panel. This is only useful when there are multiple recurrent event types or in the presence of (discrete) covariates.
an optional logical value indicating whether to add a smooth curve obtained from a monotone increasing P-splines implemented in package
a list of control parameters.
graphical parameters to be passed to methods.
adjrisk = TRUE, the
plotMCF() is equivalent to
the Nelson-Aalen estimator for the intensity function of the recurrent event process.
adjrisk = FALSE, the
plotMCF() does not adjust for the risk set and
assumes all subjects remain at risk after the last observed recurrent event.
This is known as the survivor rate function.
control consists of options with argument defaults
to a list with the following values:
customizable x-label, default value is "Time".
customizable y-label, default value is "Cumulative mean".
customizable title, default value is "Sample cumulative mean function plot".
main parameters can also be passed down without specifying a
plotMCF(Recur(t.stop, id, event, status) ~ x1, data = simDat, onePanel = TRUE)