Helper function to create the parameters for netsim_run_one_scenario
Source: R/netsim_scenarios.R
netsim_scenarios_setup.RdHelper function to create the parameters for netsim_run_one_scenario
Usage
netsim_scenarios_setup(
path_to_x,
param,
init,
control,
scenarios_list,
n_rep,
n_cores,
output_dir,
libraries
)Arguments
- path_to_x
Path to a Fitted network model object saved with
saveRDS. (See thexargument to theEpiModel::netsimfunction)- param
Model parameters, as an object of class
param.net. Includes transmission probability (inf.prob), act rate (act.rate), recovery rate (rec.rate), and demographic rates for models with vital dynamics. Custom parameters for extended models may also be passed throughparam.net.- init
Initial conditions, as an object of class
init.net. Specifies the initial number of infected nodes (i.num) and, for SIR models, recovered nodes (r.num). For two-group models, the corresponding.g2parameters are also required.- control
Control settings, as an object of class
control.net. Key settings includetype(disease model:"SI","SIR", or"SIS"),nsteps(number of time steps),nsims(number of simulations),tergmLite(lightweight mode for performance), andresimulate.network(required for models with vital dynamics). For extended models, custom module functions are also passed here.- scenarios_list
A list of scenarios to be run. Produced by the
EpiModel::create_scenario_listfunction- n_rep
The number of replication to be run for each scenario.
- n_cores
The number of CPUs on which the simulations will be run.
- output_dir
The folder where the simulation files are to be stored.
- libraries
A character vector containing the name of the libraries required for the model to run. (e.g. EpiModelHIV or EpiModelCOVID)