enw_cumulative_to_incidence: Calculate incidence of new reports from cumulative reports

enw_cumulative_to_incidenceR Documentation

Calculate incidence of new reports from cumulative reports

Description

[Deprecated]

Usage

enw_cumulative_to_incidence(obs, set_negatives_to_zero = TRUE, by = NULL)

Arguments

obs

A data.frame containing at least the following variables: ⁠reference date⁠ (index date of interest), report_date (report date for observations), and confirm (cumulative observations by reference and report date).

set_negatives_to_zero

Logical, defaults to TRUE. Should negative counts (for calculated incidence of observations) be set to zero. Currently downstream modelling does not support negative counts and so setting must be TRUE if intending to use epinowcast().

by

A character vector describing the stratification of observations. This defaults to no grouping. This should be used when modelling multiple time series in order to identify them for downstream modelling

Value

The input data.frame with a new variable new_confirm. If max_confirm was present in the data.frame then the proportion reported on each day (prop_reported) is also added.

See Also

Data converters enw_add_cumulative(), enw_add_incidence(), enw_aggregate_cumulative(), enw_incidence_to_cumulative(), enw_incidence_to_linelist(), enw_linelist_to_incidence()

Examples

# Default reconstruct incidence
dt <- germany_covid19_hosp[location == "DE"][age_group == "00+"]
enw_add_incidence(dt)

# Make use of maximum reported to calculate empirical daily reporting
dt <- enw_add_max_reported(dt)
enw_add_incidence(dt)

seabbs/epinowcast documentation built on July 17, 2024, 5:18 p.m.