library(SimInf)
4 SEIR
<- 1000
n <- data.frame(S = rep(99, n), E = rep(0, n), I = rep(5, n), R = rep(0, n))
u0
<- SEIR(u0 = u0, tspan = 1:150, beta = 0.003 * 99, epsilon = 0.033, gamma = 0.077)
seir_t <- run(seir_t)
res_t plot(res_t)
<- c("S -> beta * S * I -> E",
transitions "E -> epsilon * E -> I",
"I -> gamma * I -> R")
<- c("S", "E", "I", "R")
compartments
<- mparse(transitions = transitions,
mod compartments = compartments,
gdata = c(beta = 0.003, epsilon = 0.033, gamma = 0.077),
u0 = u0,
tspan = 1:150)
<- run(mod)
res plot(res)
4.1 Vaccination
<- c("S -> beta * S * I -> E",
transitions "E -> epsilon * E -> I",
"I -> gamma * I -> R")
<- c("S", "E", "I", "R") compartments