SIRAdditiveNoise: SIR model with constant additive noise (P 6.1).

Description Usage Arguments Details Value References See Also Examples

View source: R/SIRAdditiveNoise.R

Description

Solves a SIR model with constant additive noise added to the transmission rate.

Usage

1
SIRAdditiveNoise(pars = NULL, init = NULL, time = NULL, step = 1, ...)

Arguments

pars

vector with 5 values: the transmission rate, the recovery rate, the birth (deadth) rate, the amount of noise experienced in the transmission rate and the population size assumed to be constant. The names of these values must be "beta", "gamma", "mu", "noise", and "N" respectively.

init

vector with 2 values: the initial number of susceptibles and infectious. The names of these values must be "X", and "Y", respectively. "X" and "Y" must be positive and are numbers not proportions.

time

time sequence for which output is wanted; the first value of times must be the initial time.

step

step size to set the integration step and to scale the noise term.

...

further arguments passed to ode function.

Details

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

Value

list. The first element, *$model, is the model function. The second, third and fourth elements are the vectors *$pars, *$init and *$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 number of susceptibles and recovered.

References

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

See Also

ode.

Examples

1
2
3
4
5
6
7
8
9
# Parameters and initial conditions.
parameters <- c(beta = 1, gamma = 1 / 10, mu = 1 / (50 * 365),
                noise = 10, N = 1e6)
initials <- c(X = 1e5, Y = 500)

# Solve and plot.
sir.additive.noise <- SIRAdditiveNoise(pars = parameters, init = initials,
                                       time = 0:(2 * 365), step = 1)
PlotMods(sir.additive.noise)

EpiDynamics documentation built on May 1, 2019, 8:08 p.m.