View source: R/simulation_base_functions.R
network_covid_simulate | R Documentation |
wrapper function to simulate under four containment scenario, for multiple repeats.
network_covid_simulate( rep_num = 1, network_num = 20, output = "example", para = NA, len_sim = 100 )
rep_num |
numeric number of epidemic to simulate, >100 is recommended |
network_num |
numeric number of synthetic population to construct, could be less than rep_num to save time an space, the simulation will randomly sample one of the synthetic populations for each epidemic simulation |
output |
character prefix for saving the network data, you are encouraged to specify one otherwise default "example" will be used, potentially erasing previous analysis. |
para |
list of parameters. If you want to set up your own parameter, using init_para and modify the output. |
len_sim |
numeric number of days to simulate for the outbreak, default 100. |
list containing simulation results. Six fields are included: new_daily_case, quarantine_daily, Re_daily, RDT_used, PCR_used, death_daily. each output is a list of four matrix, one row represent one simulation of epidemic: use [1] to access the results of baseline scenario without any containment; use [2] to access results of RDT containment; use [3] to access results of PCR containment; use [4] to access results of RDT + PCR containment.
results <- network_covid_simulate(rep_num = 1, network_num = 1, output = "example", para = NA)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.