Description Usage Arguments Value
View source: R/draw_distributions.R
When a new case is generated, all the secondary infections are also generated and
loaded into the state_df
row for the primary case. The infections are only
actually loaded into the simulation at the correct time, through the function
generate_secondary_infections()
in generate_new_infections.R. To generate
secondary infections, first the number of potential secondary infections is drawn.
Then, generation intervals are generated for each potential secondary infection. Finally,
potential infections are rejected by user-defined criteria, such as being after the
isolation time for the primary case. Currently, only one type of secondary infection
algorithm is implemented (the one from Hellewell et al.). The generation intervals are
generated by a call to draw_generation_interval
.
1 | draw_sec_infects_df(state_df, sim_params, sim_status, import = FALSE)
|
state_df |
|
sim_params |
|
sim_status |
|
import |
A boolean indicating whether these new cases are imported cases instead
of secondary infections. These cases may be required to self-isolate.
Defaults to |
A list containing
n
- A vector with number of accepted secondary infections for each case (int)
generation
- A list where each entry corresponds to each case and contains a
vector of generation intervals of accepted secondary infections.
non_infects
- A list where each entry corresponds to each case and contains a
vector of generation intervals of rejected secondary infections, for debugging.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.