Description Usage Arguments Value Concordance of ℛ0 and ⟨β⟩ Missing N0, S0, and I0 Examples
View source: R/make_par_list.R
make_par_list()
creates a list of parameter values that may be
passed as an argument of:
make_data()
to simulate time series data.
estimate_beta_FC()
, estimate_beta_S()
, and estimate_beta_SI()
to estimate timevarying transmission rates
β(t).
ptpi()
to estimate the initial number of susceptibles
S_{0}.
As these methods deal with equally spaced time series data
with fixed observation interval
Δt,
make_par_list()
defines time (or rate) parameters in units
(or per unit)
Δt.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18  make_par_list(
dt_weeks = 1,
t0 = 2000 * (365/7)/dt_weeks,
prep = 1,
trep = 0,
hatN0 = 1e+06,
N0 = NA,
S0 = NA,
I0 = NA,
nu = 0.04 * (7/365) * dt_weeks,
mu = 0.04 * (7/365) * dt_weeks,
tgen = 13 * (1/7)/dt_weeks,
Rnaught = 20,
beta_mean = NA,
alpha = 0.08,
epsilon = 0,
ode_control = list(method = "lsoda", rtol = 1e06, atol = 1e06)
)

dt_weeks 
[ Δt ] Observation interval in weeks. 
t0 
[ t_{0} ] Time of the first observation in units Δt. 
prep 
[ p_{rep} ] Case reporting probability. 
trep 
[ t_{rep} ] Case reporting delay in units Δt. 
hatN0 
[ Ñ_{0} ] Population size at time t = 0 years (see Details). 
N0 
[ N_{0} ]
Population size at time
t = t_{0}.
Can be set to 
S0 
[ S_{0} ]
Number of susceptibles at time
t = t_{0}.
Can be set to 
I0 
[ I_{0} ]
Number of infecteds at time
t = t_{0}.
Can be set to 
nu 
[ ν_{c} ] Birth rate expressed per unit Δt and relative to Ñ_{0} (if modeled as constant). 
mu 
[ μ_{c} ] Natural mortality rate expressed per unit Δt and per capita (if modeled as constant). 
tgen 
[ t_{gen} ] Mean generation interval of the disease of interest in units Δt. 
Rnaught 
[ ℛ_{0} ]
Basic reproduction number of the disease of interest. Should be set
to 
beta_mean 
[ ⟨β⟩ ]
Mean of the seasonally forced transmission rate
β(t)
expressed per unit
Δt
per susceptible per infected. Should be set
to 
alpha 
[ α ] Amplitude of the seasonally forced transmission rate β(t) relative to the mean. 
epsilon 
[ ϵ ] Standard deviation of the random phase shift in the seasonally forced transmission rate β(t). 
ode_control 
A list of arguments to be passed to

A list of the arguments of make_par_list()
(not counting ...
),
including values for Rnaught
, beta_mean
, N0
, S0
, and I0
if not defined in the function call (see Details).
make_par_list()
enforces the identity
as follows. If exactly one of Rnaught
and beta_mean
is NA
in
in the function call, then that parameter is internally assigned the
value satisfying the identity. If both are NA
, then an error is
thrown. If neither is NA
, then the value of beta_mean
is replaced
with the value satisfying the identity.
If any of N0
, S0
, and I0
is NA
in the function call,
then, via a call to deSolve::ode()
, make_par_list()
numerically integrates the system of SIR equations
with
γ = 1 / t_{gen}
and
β(t) = ⟨β⟩ (1 + α cos(2πt / (1 year)))
between times
t = 0
years and
t = t_{0},
taking for the initial state
(S(0),I(0),R(0))
the endemic equilibrium of the system with
β(t) ≡ ⟨β⟩
and
ν_{c} = μ_{c}.
Then make_par_list()
defines N0
, S0
, and I0
(only those that were NA
in the function call) as follows:
N0
The value of S(t_{0})+I(t_{0})+R(t_{0}).
S0
The value of S(t_{0}).
I0
The value of I(t_{0}).
A warning is issued if the ODE solver cannot complete the integration,
A different solver may have more success (e.g., consider method = "ode45"
instead of the default method = "lsoda"
). Using different rtol
and
atol
may also help.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  # All arguments have default values
par_list < make_par_list()
unlist(par_list)
# Time and rate parameters must be specified
# in terms of the observation interval
dt_weeks < 1
nu_peryear < 0.04
tgen_days < 13
par_list < make_par_list(
dt_weeks = dt_weeks,
nu = nu_peryear * (7 / 365) * dt_weeks,
tgen = tgen_days * (1 / 7) / dt_weeks
)
unlist(par_list)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.