Sets the controls for stochastic individual contact models simulated with seiqhrf. Similar to EpiModel::control.icm, but allows for model types with additional compartments.

control_seiqhrf(
  nsteps = 366,
  nsims = 8,
  prog.rand = FALSE,
  quar.rand = TRUE,
  hosp.rand = TRUE,
  disch.rand = TRUE,
  rec.rand = FALSE,
  arec.rand = TRUE,
  fat.rand = TRUE,
  a.rand = TRUE,
  d.rand = TRUE,
  verbose = FALSE,
  verbose.int = 0,
  skip.check = FALSE,
  ncores = 4,
  track.flows = TRUE,
  track.departure = FALSE,
  track.arrival = FALSE
)

Arguments

nsteps

The number of time points to be simulated.

nsims

The number of simulations to run.

prog.rand

Method for progression from E compartment to I. If TRUE, random binomial draws at prog.rate, if FALSE, random draws from a Weibull distribution, with parameters prog.dist.scale and prog.dist.shape.

quar.rand

Method for self-isolation transition from I to Q. If TRUE, random binomial draws at quar.rate, if FALSE, random draws from a Weibull distribution, with parameters quar.dist.scale and quar.dist.shape. .

hosp.rand

Method for transition from I or Q to H -- that is, from infectious or from self-isolated to requiring hospitalisation. If TRUE, random binomial draws at hosp.rate, if FALSE, random draws from a Weibull distribution, with parameters hosp.dist.scale and hosp.dist.shape.

disch.rand

Method for transition from H to R -- that is, from requiring hospitalisation to recovered. If TRUE, random binomial draws at disch.rate, if FALSE, random draws from a Weibull distribution, with parameters disch.dist.scale and disch.dist.shape. Note that the only way out of the H compartment is recovery or death.

rec.rand

Method for progression from I compartment to R. If TRUE, use a stochastic recovery model, with the number of recovered at each time step a random draw from Binomial distribution with success probability rec.rate. If FALSE, random draws from a Weibull distribution, with parameters rec.dist.scale and rec.dist.shape.

arec.rand

Method for recovery transition from E to R. If TRUE, random binomial draws at arec.rate, if FALSE, random draws from a random draws from a Weibull distribution, with parameters arec.dist.scale and arec.dist.shape.

fat.rand

Method for case fatality transition from H to F. If TRUE, random binomial draws at fat.rate.base, if FALSE, random sample with a sample fraction also given by fat.rate.base. However, if the current number of patients in the H (needs hospitalisation) compartment is above a hospital capacity level specified by hosp.cap, then the fatality rate is the mean of the base fatality rate weighted by the hospital capacity, plus a higher rate, specified by fat.rate.overcap, weighted by the balance of those requiring hospitalisation (but who can't be accommodated). By setting fat.rate.overcap higher, the effect of exceeding the capacity of the health care system can be simulated. There is also a coefficient fat.tcoeff for the fatality rates that increases them as a linear function of the number of days the individual has been in the H compartment. Use of the co-efficient better approximates the trapezoid survival time distribution typical of ICU patients.

a.rand

If TRUE, use a stochastic arrival model, with the number of arrivals at each time step a function of random draws from a binomial distribution with the probability equal to the governing arrival rates. If FALSE, a deterministic rounded count of the expectation implied by those rates.

d.rand

If TRUE, use a stochastic departure model, with the number of departures at each time step a function of random draws from a binomial distribution with the probability equal to the governing departure rates. If FALSE, a deterministic rounded count of the expectation implied by those rates.

verbose

If TRUE, print model progress to the console.

verbose.int

Time step interval for printing progress to console, where 0 (the default) prints completion status of entire simulation and positive integer x prints progress after each x time steps.

skip.check

If TRUE, skips the default error checking for the structure and consistency of the parameter values, initial conditions, and control settings before running base epidemic models. Setting this to FALSE is recommended when running models with new modules specified.

ncores

Number of physical CPU cores used for parallel computation.

track.flows

If TRUE, function seiqhrf returns the number of changes in each procedure transition (See model description in vignette).

track.departure

Similar to track.departure.

track.arrival

If TRUE, function seiqhrf returns the number of departures of all compartments in every time step in each simulation.

Value

A control.seiqhrf object containing required control parameters and module functions.

New Modules

Base ICM models use a set of module functions that specify how the individual agents in the population are subjected to infection, recovery, demographics, and other processes. Core modules are those listed in the .FUN arguments. For each module, there is a default function used in the simulation. The default infection module, for example, is contained in the infection.FUN function. For original models, one may substitute replacement module functions for any of the default functions.