powered by
Refers to section 3.2.2.
sir_static_model(a, state, parameters)
list of class sir_static_model with the following items
list of parameters used for fitting the model
matrix of proportion for each compartment over time
age sequence.
the initial state of the system.
the model's parameter.
In state:
state
- s: proportion susceptible
s
- i: proportion infected
i
- r: proportion recovered
r
In parameters:
parameters
- lambda: natural death rate
lambda
- nu: recovery rate
nu
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