Description Usage Arguments Details Value
View source: R/generate_new_infections.R
The number of imported infections may be a deterministic or stochastic value.
1 | generate_imported_infections(sim_params, sim_status)
|
sim_params |
|
sim_status |
|
The list object sim_params$import_params
determines how imported cases are
added to the simulation. The following import types are supported, which is chosen by
sim_params$import_params$type
:
type
="None" or "none"No cases are imported.
type
="constant"Each day, the number of imported cases is equal to a constant value, set
by sim_params$import_params$rate
.
type
="constant_two_phase"Same as the above, but with two possible constant values. For
times prior to sim_params$import_params$delay
, the rate is sim_params$import_params$rate1
.
After this time, the rate is sim_params$import_params$rate2
.
type
="daily_constant"Each day, the number of imported cases is given by a vector defined by
sim_params$import_params$rate
, which should have length equal to the number of days in the
simulation.
type
="poisson"Each day, the number of imported cases is drawn from a Poisson distribution
with mean set by sim_params$import_params$rate
.
type
="daily_risk"Each day, the number of imported cases is drawn from a Poisson
distribution with mean equal to the daily risk. The daily risk is given by a vector defined by
sim_params$import_params$risk
, which should have length equal to the number of days in the
simulation.
A list containing
n_imported_infections
- Integer with number of imported cases at this time step.
import_source
- String describing the source of these new cases. This information
will be recorded in state_df
and record_df
. For now, this will always be "imported".
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.