| mcf | R Documentation |
Nonparametric (Nelson-Aalen type) estimate of the mean cumulative function, i.e. the expected number of events experienced by a subject up to each calendar time, optionally by group.
mcf(formula, data)
## S3 method for class 'mcf'
print(x, ...)
formula |
a formula object with a |
data |
a data frame in which to interpret the variables named in the formula. |
x |
an |
... |
further arguments passed to |
Calendar times are reconstructed as the within-subject cumulative sums
of the gap times of the Survr() response. At each distinct event
calendar time t the estimate increases by dN(t)/Y(t), where
dN(t) is the number of events observed at t and Y(t)
the number of subjects still under observation (total observation time
\ge t).
An object of class mcf: a data frame with columns group,
time, n.event, n.risk and mcf, with print and autoplot
methods.
Lawless, J.F. and Nadeau, C. (1995). Some Simple Robust Methods for the Analysis of Recurrent Events. Technometrics 37, 158–168.
autoplot.mcf(), survfitr()
data(MMC)
m <- mcf(Survr(id, time, event) ~ group, data = MMC)
m
autoplot(m)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.