Skip to contents

Sets the controls for stochastic network models simulated with netsim.

Usage

control_mgen(
  simno = 1,
  nsims = 1,
  ncores = 1,
  nsteps = 10,
  start = 1,
  cumulative.edgelist = FALSE,
  resimulate.network = TRUE,
  truncate.el.cuml = 0,
  amr.FUN = amr_mgen,
  initialize.FUN = initialize_mgen,
  infection.FUN = transmit_mgen,
  progress.FUN = progress_mgen,
  prevalence.FUN = trackers_mgen,
  resim_nets.FUN = resim_nets_mgen,
  summary_nets.FUN = summary_nets,
  tx.FUN = tx_mgen,
  verbose.FUN = verbose.net,
  cleanup.FUN = cleanup_msm,
  save.nwstats = FALSE,
  nwstats.formula = "formation",
  tergmLite = TRUE,
  save.network = FALSE,
  tergmLite.track.duration = FALSE,
  set.control.ergm = control.simulate.formula(MCMC.burnin = 2e+05),
  set.control.tergm = control.simulate.formula.tergm(MCMC.burnin.min = 5000),
  save.other = c("attr", "temp", "el", "net_attr"),
  verbose = FALSE,
  dat.updates = resimnet_updates,
  ...
)

Arguments

simno

Unique ID for the simulation run, used for file naming purposes if used with the EpiModelHPC package.

nsims

Number of simulations to run overall.

ncores

Number of parallel cores per run, if parallel processing is used.

nsteps

Number of time steps per simulation.

start

Starting time step for simulation, with default to 1 to run new simulation. This may also be set to 1 greater than the final time step of a previous simulation to resume the simulation with different parameters.

cumulative.edgelist

If TRUE, models tracks a cumulative edgelist (a historical list of all partners within each network over time), useful for partner services models.

truncate.el.cuml

Number of time steps of the cumulative edgelist to retain. See help file for EpiModel::update_cumulative_edgelist for details

initialize.FUN

Module function to use for initialization of the epidemic model.

resim_nets.FUN

Module function for network resimulation at each time step.

summary_nets.FUN

Module function for network statistic extraction at each time step.

verbose.FUN

Module function to print model progress to the console or external text files.

cleanup.FUN

Module function to tidy the netsim_dat object at the end of each step.

save.nwstats

Calculate and save network statistics as defined in the simnet modules.

nwstats.formula

Right-hand side formula for network statistics to monitor, with default "formation" equal to the model formula. Supports multilayer specification.

tergmLite

Logical indicating usage of tergmLite (non-modifiable currently for EpiModelHIV).

save.network

If TRUE, networkLite object is saved at simulation end.

tergmLite.track.duration

If TRUE, track duration information for models in tergmLite simulations. Supports multilayer specification.

set.control.ergm

Control arguments passed to ergm's simulate_formula.network. Supports multilayer specification.

set.control.tergm

Control arguments passed to tergm's simulate_formula.network. Supports multilayer specification.

save.other

A character vector of elements on the main netsim_dat data object to save out after each simulation.

verbose

If TRUE, print out simulation progress to the console if in interactive mode or text files if in batch mode.

dat.updates

See the general documentation for dat.updates at EpiModel::control.net. The standard implementation for the current MSM model is found in standard_resimnet_updates.

...

Additional arguments passed to the function.

aging.FUN

Module function for aging.

departure.FUN

Module function for general and disease-related departures.

arrival.FUN

Module function for entries into the sexually active population.

partident.FUN

Module function for partner identification process.

acts.FUN

Module function to simulate the number of sexual acts within partnerships.

condoms.FUN

Module function to simulate condom use within acts.

prev.FUN

Module function to calculate prevalence summary statistics.

Value

A list object of class control.net, which can be passed to the EpiModel function netsim.