SISDemogStoch: SIS model with demographic stochasticity (P 6.3).

Description Usage Arguments Details Value References Examples

View source: R/SISDemogStoch.R

Description

SIS model with event-driven or demographic stochasticity.

Usage

1
SISDemogStoch(pars, init, end.time)

Arguments

pars

vector with 3 values: the transmission and recovery rates and the population size assumed to be constant. The names of these values must be "beta", "gamma", and "N" respectively.

init

initial number of infectious.

end.time

end time to be simulated.

Details

This is the R version of program 6.3 from page 202 of "Modeling Infectious Disease in humans and animals" by Keeling & Rohani.

Value

list. The first three elements are the vectors *$pars, *$init and *$time, containing the pars, init and end.time arguments of the function. The fourth element *$results is a data.frame with up to as many rows as time steps created during the stochastic simulations. The second column contains the number of infectious.

References

Keeling, Matt J., and Pejman Rohani. Modeling infectious diseases in humans and animals. Princeton University Press, 2008.

Examples

1
2
3
4
5
6
7
8
# Parameters and initial conditions.
parameters <- c(beta = 0.03, gamma = 1 / 100, N = 100)
initials <- 70

# Solve and plot.
sis.demog.stoch <- SISDemogStoch(pars = parameters,
                                 init = initials, end.time = 10 * 365)
PlotMods(sis.demog.stoch)

EpiDynamics documentation built on March 26, 2020, 6:33 p.m.