Simple SIR-type models implemented in various ways.
sir(
gamma = 26,
mu = 0.02,
iota = 0.01,
beta1 = 400,
beta2 = 480,
beta3 = 320,
beta_sd = 0.001,
rho = 0.6,
k = 0.1,
pop = 2100000,
S_0 = 26/400,
I_0 = 0.001,
R_0 = 1 - S_0 - I_0,
t0 = 0,
times = seq(from = t0 + 1/52, to = t0 + 4, by = 1/52),
seed = 329343545,
delta.t = 1/52/20
)sir2(
gamma = 24,
mu = 1/70,
iota = 0.1,
beta1 = 330,
beta2 = 410,
beta3 = 490,
rho = 0.1,
k = 0.1,
pop = 1e+06,
S_0 = 0.05,
I_0 = 1e-04,
R_0 = 1 - S_0 - I_0,
t0 = 0,
times = seq(from = t0 + 1/12, to = t0 + 10, by = 1/12),
seed = 1772464524
)
These functions return ‘pomp’ objects containing simulated data.
recovery rate
death rate (assumed equal to the birth rate)
infection import rate
seasonal contact rates
environmental noise intensity
reporting efficiency
reporting overdispersion parameter (reciprocal of the negative-binomial size parameter)
overall host population size
the fractions of the host population that are susceptible, infectious, and recovered, respectively, at time zero.
zero time
observation times
seed of the random number generator
Euler step size
sir()
producees a ‘pomp’ object encoding a simple seasonal SIR model with simulated data.
Simulation is performed using an Euler multinomial approximation.
sir2()
has the same model implemented using Gillespie's algorithm.
In both cases the measurement model is negative binomial:
reports
is distributed as a negative binomial random variable with mean equal to rho*cases
and size equal to 1/k
.
This and similar examples are discussed and constructed in tutorials available on the package website.
More examples provided with pomp:
blowflies
,
childhood_disease_data
,
dacca()
,
ebola
,
gompertz()
,
ou2()
,
pomp_examples
,
ricker()
,
rw2()
,
verhulst()
# \donttest{
po <- sir()
plot(po)
coef(po)
po <- sir2()
plot(po)
plot(simulate(window(po,end=3)))
coef(po)
po |> as.data.frame() |> head()
# }
Run the code above in your browser using DataLab