epiDCM(type, groups = 1, s.num, i.num, r.num = 0, trans.rate, act.rate,
rec.rate = 0, b.rate = 0, ds.rate = 0, di.rate = 0, dr.rate = 0,
s.num.g2, i.num.g2, r.num.g2 = 0, trans.rate.g2, act.rate.g2,
rec.rate.g2 = 0, b.rate.g2 = 0, ds.rate.g2 = 0, di.rate.g2 = 0,
dr.rate.g2 = 0, balance, nsteps, dt, odemethod, new.mod = NULL,
print.mod = FALSE, verbose = FALSE, ...)
"SI"
for Susceptible-Infected diseases,
"SIR"
for Susceptible-Infected-Recovered diseases,
and "SIS"
for Susceptible-Infected-Susceptible
diseases.1
for purely random mixing in the
population, or 2
for purely heterogenous mixing
(e.g., two sexes with purely heterosexual contact).SIR
model type.SIR
models) or re-susceptibility (in
SIS
models). The recovery rate is a function of
the disease duration as 1/duration of disease. For
two-group models, this is the recovery ratSIR
models.SIR
models.balance
parameter.SIR
models) or re-susceptibility (in
SIS
models) for group 2 persons. This parameter is
only used for two-group SIR
and SIS
models.NA
in which case the group 1 rate, b.rate
,
governs the birth procesSIR
model types.act.rate
to the rate set for group 1 (with
balance="g1"
) or group 2 (with
balance="g2"
). Further details provided below.ode
for
other options)NULL
, this parameter
requires an object containing a function specifying a new
mathematical model form to be solved over. This
functionality allows the user to specify a different
system of differential equations than those curTRUE
, running epiDCM
will print the model form given the specified type
and groups
. This is used to see the mathematical
structure of the current model form, as well as obtain a
base functionaTRUE
, print modelling progress
to the consoleepiDCM
with the following elements: nruns=1
) or data frame (ifnruns>1
) of
compartment or state sizes over time, for each model run,
where * may equals
,i
, orr
for
susceptible, infected, or recovered, respectively. Two
group models have equivalent elements with a.g2
suffix.nruns=1
) or data frame (ifnruns>1
) of
transition sizes between compartments, for each model run,
where * may equalsi
for susceptible to infected
flows,is
for infected to susceptible flows,ir
for infected to recovered flows,b
for
birth in-flows,ds
for susceptible death out-flows,di
for infected death out-flows,dr
for
recovered death out-flows. Two group models have
equivalent elements with a.g2
suffix.act.rate
parameter represents the average
number of acts capable of transmission per person per
unit time. In the sexually transmitted disease modeling
literature, the term ``contact'' if often used, as in the
standard formulation $R_0=\beta c D$. But contact may
either mean the number of independent acts or number of
partnerships per person per unit time. In the latter
case, one often obtains the risk of transmission within a
partnership per unit time by solving the formula
$\tau = 1-(1-\alpha)^n$, where $\tau$ is the
probability of transmission per partnership, $\alpha$
is the probability of transmission per act, and $n$
is the number of acts per partnership. act.rate
parameter is to be distinguished from ``effective
contact,'' which here is the product of trans.rate
and act.rate
.In two-group models, it is necessary to maintain a balance between the number of acts for group 1 members and those for group 2 members. Mathematically in a purely heterogenous mixing framework, the product of one group size and act rate must equal the product of the other group size and act rate: $N_1 \alpha_1 = N_2 \alpha_2$, where $N_i$ is the group size and $\alpha_i$ the group-specific act rates at time $t$.
epiDCM
function has been designed to
facilitate DCM sensitivity analyses, wherein one may run
a series of models while varying one or more of the model
parameters. This is possible, as shown in the example
below, by specifying any parameter as a vector of length
greater than one. See the Section 2.3 of the
epiDCM
function is uses the ordinary
differential equation solver in the deSolve
package
to model disease as a deterministic compartmental system.
The current implementation of this function is limited to
one- and two- group models with disease types for
Susceptible-Infected (SI), Susceptible- Infected-Recovered
(SIR), and Susceptible-Infected-Susceptible (SIS). The
one-group model, specified with the parameter
groups=1
, assumes purely random mixing in the
population. The two-group model, groups=2
, models
purely heterogenous mixing in the population, wherein group
1 members may only have contact with group 2 members (e.g.,
a heterosexual-only disease transmission). This will be
further expanded in future releases of EpiModel
.One important caveat is the current parameter structure of
specifing initial state sizes and individual parameters as
primary epiDCM
parameters will be deprecated in the
EpiModel
v1.0 release. More flexibile passing of
model behavior and parameters will be implemented.
summary.epiDCM
,
plot.epiDCM
, and
as.data.frame.epiDCM
functions, respectively.
For further discussion of expanding DCMs past the current
parameterizations, see the HTML vignette
## SI Model (One-Group)
mod <- epiDCM(type="SI", s.num = 500, i.num = 1,
trans.rate = 0.2, act.rate = 0.25, nsteps = 500)
plot(mod)
## SIR Model with Vital Dynamics (One-Group)
mod <- epiDCM(type = "SIR", s.num=1000, i.num = 1, r.num = 0,
trans.rate = 0.2, act.rate = 5, rec.rate = 1/3,
b.rate = 1/90, ds.rate = 1/100, di.rate = 1/35,
dr.rate = 1/100, nsteps = 500)
plot(mod)
## SIS Model with act.rate Sensitivity Parameter
mod <- epiDCM(type="SIS", s.num = 500, i.num = 1, r.num = 0,
trans.rate = 0.2, act.rate = seq(0.1, 0.5, 0.1),
rec.rate = 1/50, nsteps = 500, verbose = TRUE)
plot(mod)
## SI Model with Vital Dynamics (Two Groups)
mod <- epiDCM(type = "SI", groups = 2,
s.num = 500, i.num = 1, s.num.g2 = 500, i.num.g2 = 0,
trans.rate = 0.4, trans.rate.g2 = 0.1,
act.rate = 0.25, balance = "g1",
b.rate = 1/100, b.rate.g2 = NA,
ds.rate = 1/100, ds.rate.g2 = 1/100,
di.rate = 1/50, di.rate.g2 = 1/50,
nsteps = 500)
plot(mod)
Run the code above in your browser using DataLab