R/scenario_sim.R
scenario_sim.Rd
Run a specified number of simulations with identical parameters
scenario_sim(
n.sim,
prop.ascertain,
cap_max_days,
cap_cases,
r0isolated,
r0community,
disp.iso,
disp.com,
k,
delay_shape,
delay_scale,
num.initial.cases,
prop.asym,
quarantine,
r0subclin = NULL,
disp.subclin = NULL
)
number of simulations to run
numeric proportion of infectious contacts ascertained by contact tracing (must be 0<=x<=1)
Stop the simulation when this many days is reached.
Stop the simulation when this many cases is reached.
numeric reproduction number for isolated cases (must be >0)
numeric reproduction number for non-isolated cases (must be >0)
numeric dispersion parameter for isolated cases (must be >0)
numeric dispersion parameter for non-isolated cases (must be >0)
numeric skew parameter for sampling the serial interval from the incubation period
numeric shape parameter of delay distribution
numeric scale parameter of delay distribution
The number of initial or starting cases which are all assumed to be missed.
proportion of cases that are completely asymptomatic.
logical whether quarantine is in effect, if TRUE then traced contacts are isolated before symptom onset
numeric reproduction number for sub-clinical non-isolated cases (must be >0)
numeric dispersion parameter for sub-clincial non-isolated cases (must be >0)
A data.table object returning the results for multiple simulations using the same set of parameters. The table has columns
week: The week in the simulation.
weekly_cases: The number of new cases that week.
cumulative: The cumulative cases.
effective_r0: The effective reproduction rate for the whole simulation
cases_per_gen: A list column with the cases per generation. This is repeated each row.
sim: Index column for which simulation.
if (FALSE) {
res <- scenario_sim(n.sim = 5,
num.initial.cases = 5,
cap_max_days = 365,
cap_cases = 2000,
r0isolated = 0,
r0community = 2.5,
disp.iso = 1,
disp.com = 0.16,
k = 0.7,
delay_shape = 2.5,
delay_scale = 5,
prop.asym = 0,
prop.ascertain = 0)
}