simulate_reporting: Simulate reporting

View source: R/simulation_functions.R

simulate_reportingR Documentation

Simulate reporting

Description

Line list data are subset by testing strategy. There are four options:

  1. Sample a random fraction of the population if the only argument is frac_report.

  2. Sample some random fraction of the population at a subset of time points, specified by timevarying_prob.

  3. Observe symptomatic individuals with some fixed probability, frac_report if symptomatic is TRUE.

  4. Observe symptomatic individuals with some time-varying probability, timevarying_prob, if symptomatic is TRUE.

Usage

simulate_reporting(
  individuals,
  solve_times,
  frac_report = 1,
  timevarying_prob = NULL,
  symptomatic = FALSE
)

Arguments

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.

Value

Returns a list of 3 things:

  1. A tibble with line list data for individuals who were observed.

  2. A plot of incidence for both observed individuals and the entire simulated population.

  3. Plot growth rate of cases/infections in the entire population and observed population.

Author(s)

James Hay, jameshay218@gmail.com

See Also

Other simulation functions: simulate_infection_times(), simulate_observations_wrapper(), simulate_seir_process(), simulate_seir_wrapper(), simulate_viral_loads_wrapper(), simulate_viral_loads()


jameshay218/virosolver documentation built on April 17, 2025, 2:57 p.m.