A Discrete Study of The SIR Model: Grant Boquet, Brandy Stigler May 7, 2004

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

A Discrete Study of the SIR Model

Grant Boquet, Brandy Stigler


May 7, 2004

Abstract
Modeling epidemics has played a vital role in predicting the im-
pact of a disease in a population and the ability of the population
to overcome it. In particular, the Kermack–McKendrick model has
been used extensively to describe the spread of various infectious dis-
eases. While the formal model is simple, in general it cannot be solved
analytically, rendering complete descriptions of dynamics intractable.
Typically numerical methods are employed, which can only discover
some of the dynamical properties of the model. We propose the use
of discrete models to qualitatively capture all the dynamics of these
models.

1 Introduction
In 1927, W. Kermack and A. McKendrick first proposed a model to “explain
the rapid rise and fall in the number of infected patients observed in epidemics
such as the plague (London 1665-1666, Bombay 1906) and cholera (London
1865)” [8]. In 1979, M. Anderson and M. May resurrected the Kermack–
McKendrick model, as known as the SIR model, for the spread of infectious
diseases [8]. More recently, this simple epidemiological model consisting of
three coupled ordinary differential equations has been used for a variety of
epidemics, including HIV and SARS ([3], [7]). Due to its applicability, it
has become the foundation for more complex, more realistic epidemiological
models.
In the next section, we present a formal description of the class of SIR
models, as well as some mathematical properties. For a particular model,
we construct two discrete models in Section 3, and show that their dynamics

1
are qualitatively similar to the continuous dynamics in Section 4. We then
apply these techniques to an SIR model for the spread of the plague in 1665
and discuss the results in Section 5. We close with some remarks on further
application of these discrete models.

2 The SIR Model


The Kermack–McKendrick model is commonly referred to as the SIR model,
where S denotes the group of people in a population that is susceptible to
a given disease, I the group of infected people, and R the group that has
recovered or been removed (not to be susceptible again). In the basic model,
it is assumed that the population size is fixed and the population is homoge-
neous; that is, gender, age, and physical location of the individuals are not
considered in the model, for example. Another assumption is that the incu-
bation period for the disease being modeled is instantaneous. Furthermore
the disease cannot be latent, implying that the duration of the disease is the
same as the duration of infectivity. Lastly, the rates of infection and recovery
are constants.
The above assumptions make for a very simple class of models, though
this simplicity does not guarantee the existence of an analytic solution in
general. The assumptions can be relaxed, however, to create more realistic
models. This additional complexity only lessens the chances for finding an
analytic solution. Nonetheless, in special cases, such solutions can be found
[6].
The general form of the SIR model is as follows:
dS
= −βSI
dt
dI
= βSI − γI
dt
dR
= γI (1)
dt
where β is the rate of infection and γ is the rate of recovery. The model
conserves population size since

−βSI + βSI − γI + γI = 0.

2
Moreover, the model has a special constant r0 associated to it, called the
reproductive number, which is an indicator of the ability of a disease to prop-
agate.
βS0
r0 =
γ
where S0 is the initial number of susceptible people. If r0 < 1, then the
disease will die out, whereas if r0 > 1, it may become an epidemic [8].
The system in Equation 1 is a set of coupled ODEs that have the potential
to be stiff (not well-posed for perturbations that are too large) depending
on the size of the population. In this study, we set the population size to be
500,000. In addition, the values of β = 0.00001 and γ = 0.5 were chosen,
thus defining an instance of an SIR model for a disease with reproductive
number 10. It is for this model that we perform the following analysis using
discrete models.

3 Two Discrete Models


Here we construct two discrete models that have similar dynamics as the
Kermack–McKendrick model specified at the end of Section 2. We applied
the Lewis–Glass hypercube projection method [5] and the Laubenbacher–
Stigler polynomial interpolation method [4] to find discrete approximations
of the dynamics of this continuous model.

3.1 Discretization the ODE Model


In the article by [5], the authors presented a method which associates to
a given system of ordinary differential equations a Booleanization of that
system. This discrete system has the property that the dynamics, drawn on
a hypercube of appropriate dimension, is an abstraction of the continuous
system.
In order to Booleanize the ODE model, a set of numerical simulations
were run to determine an appropriate threshold. Euler’s method with a time
step of 0.00001 was used to numerically solve the system. A threshold of
5% of the population was chosen. This allows for small population sizes to
be considered negligible and facilitates the discovery of equilibria or steady

3
states. Therefore, the following function was used to Booleanize the states
of S, I, and R:


0 x < 25, 000
B(x) =
1 x ≥ 25, 000.

Since we are modeling 3 groups in a fixed population, the hypercube on


which we will project the dynamics is of dimension 3 (see Figure 1). Each
vertex corresponds to a Boolean triple, representing a state of the continuous
system. For example, the vertex labeled (1,0,0) means that the size of the
susceptible group S is above the threshold and that each of the other 2
groups represents less than 5% of the population. Note that not all vertices
are meaningful for the continuous system. In particular, the vertex labeled
(0,0,0) is not feasible: due to conservation of the population, at no time can
the size of each population be simultaneously below the threshold, yet still
sum to 500,000. Therefore, the vertex (0,0,0), as well as any edge adjacent
to (0,0,0), were excluded from our analysis.

001 011

101 111

000 010

100 110

Figure 1: A hypercube projection capturing the dynamics of the ODE sys-


tem.

Boolean trajectories, that is, orientation of the edges on the 3–cube, are
obtained as follows. Starting at a feasible vertex, initial values for the pop-
ulations S, I, and R that correspond to the Boolean state are chosen. Then
the Boolean model is numerically solved. For the initial state (1,0,0), the

4
Figure 2: The solution for the Boolean model with initial conditions S0 =
499, 999, I0 = 1, and R0 = 0, which corresponds to the Boolean state (1,0,0).
Red = S, green = I, and blue = R.

numerical solution is given in Figure 2. Each time the solution crosses the
threshold, a new Boolean state has been visited and an edge is given an ori-
entation. For example, the trajectory corresponding to the solution in Figure
2 is
100 → 110 → 111 → 011 → 001 → 001.
(We suppress parentheses and commas to facilitate readability.) In this way
we were able to orient the edges on the 3–cube. Dynamics can then be read
from the directed paths on the cube. The resulting hypercube projection is
displayed in Figure 1 and all trajectories are listed in Table 1.

Data1 Data2 Data3 Data4


100 010 101 101
110 011 111 001
111 001 011 001
011 001 001
001 001
001

Table 1: Time series generated by the Booleanized ODE model.

We find that there is one fixed point, 001, and one “unstable source” (a
vertex with outdegree > 1), 101. Two trajectories are possible from 101,
depending on the value of S or R being close to the threshold. Further-

5
more, there are two edges without orientation: 110 — 010 and 101 — 100.
We note that the transitions 110 → 010 and 100 → 101 are viable, though
we were unable to find initial conditions that made these transitions. The
opposite directions, however, are not viable: by the definition of the con-
tinuous system, the susceptible population cannot grow in size, nor can the
recovered/removed group decrease.

3.2 Building a Polynomial Model


In [4] the authors provided a method to reverse engineer a network given time
series of measurements. The output of the algorithm is a discrete dynamical
system, described by a collection of polynomial functions, one for each node
of the network, which interpolate a discretization of the given data. See [4]
for a complete description of the method.
For each vertex v 6= 000 on the 3–cube, we generated a time series with
v as the initialization. The time series are given in Table 1. The presence
of the unstable source does not allow for modeling by a single deterministic
dynamical system. In fact, for each trajectory out of 101, a different model
must be constructed. So, we propose two polynomial models: one for data
sets 1, 2, and 3 and another for data sets 1, 2, and 4. We represent the state
of S by x1 , I by x2 , and R by x3 . Similarly, we represent the update function
of S (respectively, I and R) by f1 (respectively f2 and f3 ). Using the method
in [4], we constructed the polynomial models shown in Table 2, and their
dynamics is shown in Figure 3.

Data1-Data2-Data4 Data1-Data2-Data3
f1 = x1 (x3 + 1) f1 = x2 x3 + (x2 + x3 )(x1 + 1) + 1
f2 = x1 x2 + (x1 + x2 )(x3 + 1) f2 = x3 (x1 + 1) + 1
f 3 = x 2 x3 + x 2 + x 3 f 3 = x 2 x3 + x 2 + x 3 .

Table 2: The polynomial models for the time series in Table 1.

We now briefly discuss the interpretation of some of the functions. The


update function for S in the model in Table 2(a) translates to the Boolean
function S ∧ ¬R. Intuitively, the size of the susceptible population is above
the threshold if it was yesterday and there are few that have recovered. On
the other hand, the S group is below the threshold if it was yesterday or there
are many people who have had the illness and recovered. Also, the function

6
Figure 3: State space of the model for (a) Data1-Data2-Data4 and (b) Data1-
Data2-Data3. A cross indicates omission of a node and all adjacent links.

for I in the second model translates to S ∨ ¬R, which also has a similar
interpretation. The update functions for R in both models are identical:
I ∨ R.

4 Methods of Validation with Results


We now demonstrate that the two discrete models built in Section 3 produce
the expected dynamics.

4.1 Testing the Dynamics on the 3–Cube


Validation of the dynamics on the 3–cube was performed by changing initial
conditions over their domain and plotting the solution’s behavior. We chose
400 initial values for S, I, and R. Note that in Figure 1, there is only one pre-
dicted steady state. The images in Figure 4 demonstrate that the hypercube
projection method was able to capture the steady state of the continuous
system for all initial conditions tested.

7
(a) (b) (c)

Figure 4: (a) Solutions for S. (b) Solutions for I. (c) Solutions for R.

4.2 Testing the Dynamics of the Polynomial Models


We used the discrete dynamics visualizer DVD [1] to compute and display
the state spaces of the models in Table 2. In Figure 3 are their graphs. By
studying the state spaces, we find that both models have the fixed point
001. Furthermore, neither polynomial model gives inconsistent transitions,
namely 010 → 110 and 101 → 100.

5 An Application to Real Data


In 1665, the plague hit the village of Eyam, near London, England. At
the onset of the disease, only 7 people were contagious, while 254 had not
been touched by the plague. When the epidemic ended, only 83 people had
not contracted the disease [2]. This information provides us with the initial
values for S0 = 254, I0 = 7, and R0 = 0, yielding a population of 263. The
threshold we chose was 10, roughly 4% of the population. The solution of
the Boolean model is shown in Figure 5. Given the initial values and the
threshold, the corresponding Boolean initialization is 100 with trajectory

100 → 110 → 111 → 101 → 101.

Using this time series of Boolean states, we computed the polynomial model
and showed its dynamics in Figure 6.
These functions were computed using only a single time series. To gain
insight from the form of the polynomials, we rewrite them using Boolean
300
’S.out’
’I.out’
250 ’R.out’

200

150

100

50

0
0 2 4 6 8 10

Figure 5: The solution of the Boolean Eyam model. Red = S, dark blue =
I, light blue = R.

f1 = x1
f2 = x3 + 1
f 3 = x 2 x3 + x 2 + x 3

(a)

(b)

Figure 6: (a) The polynomial model for the Eyam data and (b) its state
space.

operators: fS = S, fI = ¬R, and fR = I ∨ R. Viewing the polynomials in


this way gives us agreement with the behavior of the system in Figure 5.
Because of the way the model is defined, there are known constraints that
must be preserved in any model. For example, a Boolean state (0,*,*) cannot
transition to a state (1,*,*) since the susceptible group can only decrease in
size. Similarly a state (*,*,1) cannot transition to (*,*,0) as the recovered
(or removed) group can only grow, as per its definition in the model. We
see that the state space in Figure 6 is consistent with the constraints of the
model.

9
6 Conclusion
Presented were two discrete methods for simulating continuous models (sys-
tems of coupled ODEs). Both proved to correctly capture behavior of the
continuous model by numerical simulation. One approach that may be taken
to further validate their capabilities is to apply these methods to a system
with periodic steady states. Detecting these cycles in the hypercube would
demonstrate this method’s applicability to more complicated biological sys-
tems. This could be done by adding support for a changing population size
in the used SIR model by introduction of a birth rate and migration.

References
[1] Discrete visualizer of dynamics. http://dvd.vbi.vt.edu.

[2] Visualization and modeling of complex systems.


~
http://scs.gmu.edu/jerwin/csi758/.

[3] Doyle M. Greenhalgh, D. and F. Lewis. A mathematical treatment of


aids and condom use. IMA J Math Appl Med Biol, 18:225–262, 2001.

[4] R. Laubenbacher and B. Stigler. A computational algebra approach to


the reverse engineering of gene regulatory networks. J Theor Biol. to
appear.

[5] J. Lewis and L. Glass. Steady states, limit cycles, and chaos in models
of complex biological networks. Intl J Bifur Chaos, 1, 1991.

[6] M. Newman. The spread of epidemic disease on networks.


http://www.santafe.edu/sfi/publications/wplist/2002.

[7] Turinici G. Ng, T. and A. Danchin. A double epidemic model for the sars
propagation. BMC Infect Dis, 3:19, 2003.

[8] Eric W. Weisstein et al. Kermack–mckendrick disease model.


http://mathworld.wolfram.com/Kermack-McKendrickModel.html.

10

You might also like