Simulate cases from a single Rt trace, an initial number of cases, and a reporting model
This functionality has largely been superseded by
simulate_infections and will likely to replaced
or updated to depend on
simulate_cases( rts, initial_cases, initial_date, generation_interval, rdist = rpois, delay_defs, reporting_effect, reporting_model, truncate_future = TRUE, type = "sample" )
A dataframe of containing two variables
rt being numeric and
date being a date.
Integer, initial number of cases.
as.Date("2020-02-01")). Starting date of the simulation.
Numeric vector describing the generation interval probability density
A function to be used to sample the number of cases. Must take two
arguments with the first specifying the number of samples and the second the mean. Defaults
rpois if not supplied
A list of single row data.tables that each defines a delay distribution (model, parameters and maximum delay for each model).
lognorm_dist_def for an example of the structure.
A numeric vector of length 7 that allows the scaling of reported cases by the day on which they report (1 = Monday, 7 = Sunday). By default no scaling occurs.
A function that takes a single numeric vector as an argument and returns a single numeric vector. Can be used to apply stochastic reporting effects. See the examples for details.
Logical, should cases be truncated if they occur after the first date reported in the data.
Character string indicating the method to use to transform counts. Supports either "sample" which approximates sampling or "median" would shift by the median of the distribution.
A dataframe containing three variables: