Learn R Programming

serosv (version 1.1.0)

sir_static_model: SIR static model (age-heterogeneous, endemic equilibrium)

Description

Refers to section 3.2.2.

Usage

sir_static_model(a, state, parameters)

Value

list of class sir_static_model with the following items

parameters

list of parameters used for fitting the model

output

matrix of proportion for each compartment over time

Arguments

a

age sequence.

state

the initial state of the system.

parameters

the model's parameter.

Details

In state:

- s: proportion susceptible

- i: proportion infected

- r: proportion recovered

In parameters:

- lambda: natural death rate

- nu: recovery rate

Examples

Run this code
state <- c(s=0.99,i=0.01,r=0)
parameters <- c(
  lambda = 0.05,
  nu=1/(14/365) # 2 weeks to recover
)
ages<-seq(0, 90, by=0.01)
model = sir_static_model(ages, state, parameters)
model

Run the code above in your browser using DataLab