SIS {EpiDynamics} | R Documentation |
Solves a simple SIS model without births or deaths.
SIS(pars = NULL, init = NULL, time = NULL, ...)
pars |
|
init |
|
time |
time sequence for which output is wanted; the first value of times must be the initial time. |
... |
further arguments passed to ode function. |
This is the R version of program 2.5 from page 39 of "Modeling Infectious Disease in humans and animals" by Keeling & Rohani.
All parameters must be positive and S + I <= 1.
list
. The first element, *$model
, is the model function. The second, third and fourth elements are the vectors (*$pars
, *$init
, *$time
, containing the pars
, init
and time
arguments of the function. The fifth element *$results
is a data.frame
with up to as many rows as elements in time. First column contains the time. Second and third columns contain the proportion of susceptibles and infectious.
Keeling, Matt J., and Pejman Rohani. Modeling infectious diseases in humans and animals. Princeton University Press, 2008.
ode.
# Parameters and initial conditions.
parameters <- c(beta = 1.4247, gamma = 0.14286)
initials <- c(S = 1 - 1e-06, I = 1e-06)
# Solve and plot.
sis <- SIS(pars = parameters, init = initials, time = 0:70)
PlotMods(sis)