.check_sim_input | R Documentation |
Check if arguments input to simulation function are valid
.check_sim_input(
sim_type = c("linelist", "contacts", "outbreak"),
contact_distribution,
infectious_period,
prob_infection,
outbreak_start_date,
outbreak_size,
onset_to_hosp = NULL,
onset_to_death = NULL,
onset_to_recovery = NULL,
anonymise = NULL,
case_type_probs = NULL,
contact_tracing_status_probs = NULL,
hosp_risk = NULL,
hosp_death_risk = NULL,
non_hosp_death_risk = NULL,
population_age = NULL
)
sim_type |
A |
contact_distribution |
A The function can be defined or anonymous. The function must have a single
argument in the form of an An The default is an anonymous function with a Poisson probability mass function
( |
infectious_period |
A The function can be defined or anonymous. The function must return a vector of randomly generated real numbers representing sampled infectious periods. The function must have a single argument, the number of random infectious periods to generate. An The default is an anonymous function with a lognormal distribution random
number generator ( |
prob_infection |
A single |
outbreak_start_date |
A |
outbreak_size |
A |
onset_to_hosp |
A The function can be defined or anonymous. The function must return a vector
of An The default is an anonymous function with a lognormal distribution random
number generator ( If |
onset_to_death |
A The function can be defined or anonymous. The function must return a vector
of An The default is an anonymous function with a lognormal distribution random
number generator ( If For hospitalised cases, the function ensures the onset-to-death time is
greater than the onset-to-hospitalisation time. After many (1000) attempts,
if an onset-to-death time (from |
onset_to_recovery |
A The function can be defined or anonymous. The function must return a vector
of An The default is For hospitalised cases, the function ensures the onset-to-recovery time is
greater than the onset-to-hospitalisation time. After many (1000) attempts,
if an onset-to-recovery time (from |
anonymise |
A |
case_type_probs |
A named |
contact_tracing_status_probs |
A named |
hosp_risk |
Either a single |
hosp_death_risk |
Either a single |
non_hosp_death_risk |
Either a single |
population_age |
Either a |
Arguments that are used by all simulation functions are required
and not given a default value, for other arguments that are not inputs in
all simulation functions a default of NULL
is used.
Defaults mentioned in argument documentation is the default for the exported
simulation function and not the default in this checking function. In this
function there is either no default or NULL
.
Invisibly return the sim_type
character
string. The function is
called for its side-effects, which will error if the input is invalid.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.