cumulate: Compute cumulative 'incidence'

View source: R/cumulate.R

cumulateR 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)


incidence2 documentation built on July 9, 2023, 5:35 p.m.