simulate_observations_wrapper: Simulate full line list data

View source: R/simulation_functions.R

simulate_observations_wrapperR Documentation

Simulate full line list data

Description

Takes a vector of infection incidence (absolute numbers) and returns a tibble with line list data for all individuals in the population. Infected individuals are assigned symptom onset, incubation periods (if applicable) and confirmation delays from log normal and gamma distributions respectively.

Usage

simulate_observations_wrapper(
  incidence,
  times,
  symp_frac = 0.35,
  population_n = 1e+05,
  incu_period_par1 = 1.621,
  incu_period_par2 = 0.418,
  conf_delay_par1 = 5,
  conf_delay_par2 = 2,
  sampling_dist_use = extraDistr::rdgamma,
  onset_peak_cor = NULL,
  peak_time_sd = NULL
)

Arguments

incidence

A vector of infection incidence (absolute numbers).

times

Calendar time (i.e. days since the start of the epidemic).

symp_frac

Fraction of the population that is symptomatic. Defaults to 0.35.

population_n

Size of the population. Defaults to 100,000. Must match the N used in the simulate_seir_process function.

incu_period_par1

The first parameter (meanLog) associated with the log-normal incubation period. Defaults to 1.621.

incu_period_par2

The second parameter (sdLog) associated with the log-normal incubation period. Defaults to 0.418.

conf_delay_par1

The first parameter (shape) associated with the discretized gamma confirmation delay. Defaults to 5.

conf_delay_par2

The second parameter (rate) associated with the discretized gamma confirmation delay. Defaults to 2.

onset_peak_cor

Gives the correlation between peak viral load timing and onset time.

Value

A tibble with line list data for all individuals in the population.

Author(s)

James Hay, jameshay218@gmail.com

See Also

Other simulation functions: simulate_infection_times(), simulate_reporting(), 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.