control.dcm {EpiModel} | R Documentation |
Control Settings for Deterministic Compartmental Models
Description
Sets the controls for deterministic compartmental models
simulated with dcm
.
Usage
control.dcm(
type,
nsteps,
dt = 1,
odemethod = "rk4",
dede = FALSE,
new.mod = NULL,
sens.param = TRUE,
print.mod = FALSE,
verbose = FALSE,
...
)
Arguments
type |
Disease type to be modeled, with the choice of |
nsteps |
Number of time steps to solve the model over or vector of times to solve the model over. If the number of time steps, then this must be a positive integer of length 1. |
dt |
Time unit for model solutions, with the default of 1. Model solutions for fractional time steps may be obtained by setting this to a number between 0 and 1. |
odemethod |
Ordinary differential equation (ODE) integration method,
with the default of the "Runge-Kutta 4" method (see |
dede |
If |
new.mod |
If not running a base model type, a function with a new model to be simulated (see details). |
sens.param |
If |
print.mod |
If |
verbose |
If |
... |
additional control settings passed to model. |
Details
control.dcm
sets the required control settings for any deterministic
compartmental models solved with the dcm
function. Controls are
required for both base model types and original models. For an overview of
control settings for base DCM class models, consult the
Basic DCMs tutorial.
For all base models, the type
argument is a necessary parameter
and it has no default.
Value
An EpiModel
object of class control.dcm
.
New Model Functions
The form of the model function for base models may be displayed with the
print.mod
argument set to TRUE
. In this case, the model will
not be run. These model forms may be used as templates to write original
model functions.
These new models may be input and solved with dcm
using the
new.mod
argument, which requires as input a model function. Details
and examples are found in the
New DCMs tutorial.
See Also
Use param.dcm
to specify model parameters and
init.dcm
to specify the initial conditions. Run the
parameterized model with dcm
.