Create a SISe_sp model to be used by the simulation
framework.
Usage
SISe_sp(
u0,
tspan,
events = NULL,
phi = NULL,
upsilon = NULL,
gamma = NULL,
alpha = NULL,
beta_t1 = NULL,
beta_t2 = NULL,
beta_t3 = NULL,
beta_t4 = NULL,
end_t1 = NULL,
end_t2 = NULL,
end_t3 = NULL,
end_t4 = NULL,
coupling = NULL,
distance = NULL
)Arguments
- u0
A
data.framewith the initial state in each node, i.e., the number of individuals in each compartment in each node when the simulation starts (see ‘Details’). The parameteru0can also be an object that can be coerced to adata.frame, e.g., a named numeric vector will be coerced to a one rowdata.frame.- tspan
A vector (length >= 1) of increasing time points where the state of each node is to be returned. Can be either an
integeror aDatevector.If
integer: Represents the specific time points (e.g., days, hours) at which to record the state.If
Date: Coerced to a numeric vector representing the day of the year (1–366) relative to the first date in the vector. The originalDateobjects are preserved as names for the numeric vector, facilitating time-series plotting.
- events
a
data.framewith the scheduled events, seeSimInf_model.- phi
A numeric vector with the initial environmental infectious pressure in each node. Will be repeated to the length of nrow(u0). Default is NULL which gives 0 in each node.
- upsilon
Indirect transmission rate of the environmental infectious pressure
- gamma
A numeric vector with the recovery rate from infected to susceptible. Each node can have a different gamma value. The vector must have length 1 or
nrow(u0). If the vector has length 1 but the model contains more nodes, the value is repeated for all nodes.- alpha
Shedding rate of the pathogen to the environment per infected individual.
- beta_t1
The decay of the environmental infectious pressure in interval 1.
- beta_t2
The decay of the environmental infectious pressure in interval 2.
- beta_t3
The decay of the environmental infectious pressure in interval 3.
- beta_t4
The decay of the environmental infectious pressure in interval 4.
- end_t1
vector with the non-inclusive day of the year that ends interval 1 in each node. Will be repeated to the length of nrow(u0).
- end_t2
vector with the non-inclusive day of the year that ends interval 2 in each node. Will be repeated to the length of nrow(u0).
- end_t3
vector with the non-inclusive day of the year that ends interval 3 in each node. Will be repeated to the length of nrow(u0).
- end_t4
vector with the non-inclusive day of the year that ends interval 4 in each node. Will be repeated to the length of nrow(u0).
- coupling
The coupling between neighboring nodes
- distance
The distance matrix between neighboring nodes
Details
The SISe_sp model contains two compartments; number of
susceptible (S) and number of infectious (I). Additionally, it
contains an environmental compartment to model shedding of a
pathogen to the environment. Moreover, it also includes a spatial
coupling of the environmental contamination among proximal nodes
to capture between-node spread unrelated to moving infected
individuals. Consequently, the model has two state transitions,
$$S \stackrel{\upsilon \varphi S}{\longrightarrow} I$$
$$I \stackrel{\gamma I}{\longrightarrow} S$$
where the transition rate per unit of time from susceptible to infected is proportional to the concentration of the environmental contamination \(\varphi\) in each node. Moreover, the transition rate from infected to susceptible is the recovery rate \(\gamma\), measured per individual and per unit of time. Finally, the environmental infectious pressure in each node is evolved by,
$$\frac{d \varphi_i(t)}{dt} = \frac{\alpha I_{i}(t)}{N_i(t)} + \sum_k{\frac{\varphi_k(t) N_k(t) - \varphi_i(t) N_i(t)}{N_i(t)} \cdot \frac{D}{d_{ik}}} - \beta(t) \varphi_i(t)$$
where \(\alpha\) is the average shedding rate of the pathogen to
the environment per infected individual and \(N = S + I\) the
size of the node. Next comes the spatial coupling among proximal
nodes, where \(D\) is the rate of the local spread and
\(d_{ik}\) the distance between holdings \(i\) and
\(k\). The seasonal decay and removal of the pathogen is
captured by \(\beta(t)\). The environmental infectious pressure
\(\varphi(t)\) in each node is evolved each time unit by
the Euler forward method. The value of \(\varphi(t)\) is
saved at the time-points specified in tspan.
Seasonal Decay (\(\beta(t)\)):
The decay rate \(\beta(t)\) is piecewise constant, defined by four
intervals determined by the parameters end_t1, end_t2,
end_t3, and end_t4 (days of the year, where
0 <= day < 365). The year is divided into four intervals based
on the sorted order of these endpoints. The interval that wraps around
the year boundary (from the last endpoint to day 365, then from day 0
to the first endpoint) receives the same rate as the interval
preceding the first endpoint. Three orderings are supported:
Case 1: end_t1 < end_t2 < end_t3 < end_t4
Interval 1:
[0, end_t1)with ratebeta_t1Interval 2:
[end_t1, end_t2)with ratebeta_t2Interval 3:
[end_t2, end_t3)with ratebeta_t3Interval 4:
[end_t3, end_t4)with ratebeta_t4Interval 1 (wrap-around):
[end_t4, 365)with ratebeta_t1
Case 2: end_t3 < end_t4 < end_t1 < end_t2
Interval 3:
[0, end_t3)with ratebeta_t3Interval 4:
[end_t3, end_t4)with ratebeta_t4Interval 1:
[end_t4, end_t1)with ratebeta_t1Interval 2:
[end_t1, end_t2)with ratebeta_t2Interval 3 (wrap-around):
[end_t2, 365)with ratebeta_t3
Case 3: end_t4 < end_t1 < end_t2 < end_t3
Interval 4:
[0, end_t4)with ratebeta_t4Interval 1:
[end_t4, end_t1)with ratebeta_t1Interval 2:
[end_t1, end_t2)with ratebeta_t2Interval 3:
[end_t2, end_t3)with ratebeta_t3Interval 4 (wrap-around):
[end_t3, 365)with ratebeta_t4
These different orderings allow the model to handle seasonal patterns where, for example, a winter peak crosses the year boundary.
The argument u0 must be a data.frame with one row for
each node with the following columns:
- S
The number of susceptible
- I
The number of infected