sirs_birthsdeaths: SIRS model with equal births and deaths for population...

Description Usage Arguments Details Value Examples

Description

A basic SIRS mode with equal births and deaths; 3 compartments susceptible, infection and recovery processes solved using ode

Usage

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

Arguments

pars

vector of 4 parameters beta, gamma,mu and xi. beta is the transmission rate, gamma is the recovery rate, mu is the per capita death rate, and the population level birth rate and xi is the rate which recovered individuals return to the susceptible statue.

init

vector of 3 parameters S (Susceptible proportion), I (Infected proportion) and R (Recovered proportion). These values are the starting values

time

time sequence

Details

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

Value

listThe list contains four arguments.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.2,
                beta = 0.03, gamma = 0.5, xi = 0.05)
initials <- c(S = 0.3, I = 0.4, R = 0.3)
times <- 0:30

# Solve
sirs.birthsdeaths <- sirs_birthsdeaths(pars = parameters, init = initials, time = times)$results

#Plot
plot(sirs.birthsdeaths)

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