View source: R/simulated-data.R
observed_cases | R Documentation |
Generate reported case trajectories for each day when cases appear
observed_cases(cases_true, reporting_parameters, days_max_follow_up = 30)
cases_true |
a vector of true cases originating each day |
reporting_parameters |
either a named list of 'mean' and 'sd' of gamma distribution indicating a single reporting delay distribution for the whole period or a tibble with columns: 'time_onset', 'mean', 'sd' indicating the reporting delay distribution for each time period |
days_max_follow_up |
max days at which to simulate reporting case trajectory |
a tibble with observed case trajectories for each time of onset
library(incidenceinflation)
observed_cases(stats::rpois(5, 5), list(mean=5, sd=1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.