View source: R/simulation_functions.R
simulate_reporting | R Documentation |
Line list data are subset by testing strategy. There are four options:
Sample a random fraction of the population if the only argument is frac_report.
Sample some random fraction of the population at a subset of time points, specified by timevarying_prob.
Observe symptomatic individuals with some fixed probability, frac_report if symptomatic is TRUE.
Observe symptomatic individuals with some time-varying probability, timevarying_prob, if symptomatic is TRUE.
simulate_reporting(
individuals,
solve_times,
frac_report = 1,
timevarying_prob = NULL,
symptomatic = FALSE
)
individuals |
The full line list from the simulation, returned by virosolver::simulate_observations_wrapper. |
solve_times |
Vector of times at which individuals can be reported. |
frac_report |
The overall fraction/probability of individuals who are reported. Defaults to 1. |
timevarying_prob |
A tibble with variables t and prob. This gives the probability of being reported on day t. NULL by default. |
symptomatic |
If TRUE, then individuals are reported after developing symptoms. If FALSE, then we take a random cross-section. Defaults to FALSE. |
Returns a list of 3 things:
A tibble with line list data for individuals who were observed.
A plot of incidence for both observed individuals and the entire simulated population.
Plot growth rate of cases/infections in the entire population and observed population.
James Hay, jameshay218@gmail.com
Other simulation functions:
simulate_infection_times()
,
simulate_observations_wrapper()
,
simulate_seir_process()
,
simulate_seir_wrapper()
,
simulate_viral_loads_wrapper()
,
simulate_viral_loads()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.