View source: R/sir_static_model.R
| sir_static_model | R Documentation |
Refers to section 3.2.2.
sir_static_model(a, state, parameters)
a |
age sequence. |
state |
the initial state of the system. |
parameters |
the model's parameter. |
In state:
- s: proportion susceptible
- i: proportion infected
- r: proportion recovered
In parameters:
- lambda: natural death rate
- nu: recovery rate
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 |
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.