sir_additive: SIR model with equal births and deaths and constant additive...

Description Usage Arguments Details Value Examples

Description

A basic SIR model with equal births and deaths; 3 compartments susceptible, infection and recovery and additive noise added to the transimtion rate. The processes is solved using ode

Usage

1
sir(pars = NULL, init = NULL, time = NULL)

Arguments

pars

vector of 5 parameters beta, gamma, mu, psi and N. beta is the transmission rate, gamma is the recovery rate, mu is the per capita death rate, and the population level birth rate, psi is the noise term and N the entire population

init

vector of 3 parameters S (Number of Susceptibles), I (Number of Infections) and R (Number of Recoeverds). These values are the starting values

time

time sequence

Details

S,I,R must be positive and S + I + R <= N.

Value

listThe list contains 4 elements.First, second and third are the arguments of the function $pars,$init, $time. The fourth argument results, is a data.frame and S3 element (class type 'sir'). The results for each stage across a specific time-frame are displayed in this dataframe

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Input parameters and initial stages.
parameters <- c(mu = 0.003,
                beta = 1, gamma = 0.1, psi = 0.9, N = 40000)
initials <- c(S = 20000, I = 500, R =0)
times <- 0:30

# Solve
sir.additive <- sir_additive(pars = parameters, init = initials, time = times)

#Plot
plot(sir.additive$results)

NicolasPhysentzides/popdyn documentation built on Sept. 11, 2020, 2:26 p.m.