cumulate {incidence2} | R Documentation |
Compute cumulative 'incidence'
Description
cumulate()
computes the cumulative incidence over time for an
incidence2 object.
Usage
cumulate(x)
Arguments
x |
incidence2 object. |
Examples
dat <- data.frame(
dates = as.integer(c(0,1,2,2,3,5,7)),
groups = factor(c(1, 2, 3, 3, 3, 3, 1))
)
i <- incidence(dat, date_index = "dates", groups = "groups")
cumulate(i)
[Package incidence2 version 2.3.1 Index]