Stochastic simulation of epidemics

Basic problem

In some of your courses you may have encountered deterministic epidemiological models that describe the spread of a disease through a population of hosts. Deterministic models have the shortcoming that they do not account for the discrete nature of populations (ie they consist of individuals that cannot be arbitrarily divided), and that most biological processes are stochastic. Partly for these reasons, mathematical epidemiology is dominated by stochastic models today.

In this module, we ask you to simulate a simple Susceptible-Infected-Recovered (SIR model in order to learn about how to simulate and analyse stochastic models. Although the topic originates from mathematical epidemiology, the lessons learned from this module will prove useful in any area where stochastic models are applied.

General approach

We will develop a program that simulates a stochastic SIR model using the Gillespie algorithm. Because the output from different runs of a stochastic model varies, we will have to run it thousands of times. Analysing the model will then consist of summarising this output in various ways.

What can be learned?

Simulation of stochastic models
Difference between stochastic and deterministic dynamics
Analysis of stochastic models

Starting point

Download the Downloadhandout (PDF, 190 KB) of this module, which contains the theoretical introduction into the stochastic modeling of epidemics, and an outline for a program which simulates a stochastic SIR model (Downloadstart_stochSIR.r (R, 2 KB)). Try to make this program work. Once the program runs, you can investigate any of the following questions. (At that point, you might want to restructure the simulation as a function, see Downloadstart_stochSIR_f.r (R, 2 KB)). You are also advised to check out the related module SIR models of epidemics.

Questions that can be investigated

What is the extinction probability of the infection for different R0's?
Does the average dynamics of the stochastic model differ from the deterministic SIR model? (Download Downloadintpol.r (R, 614 Bytes) and DownloadSIR-determ.r (R, 1 KB) for this exercise)
Are the population sizes across runs normally distributed? Does their distribution change over time? What are the implications for statistical inference?

Glossary

Stochasticity: randomness; the quality of lacking any predictable order or plan
SIR model: a simple epidemiological model with three populations: susceptibles, infecteds, and recovereds
Gillespie algorithm: An efficient algorithm to simulate stochastic models (see the handout for more)
Statistical inference: area of statistics concerned with fitting models to data and estimating model parameters

Literature

Rohani P, Keeling MJ & Grenfell BT. (2002). external pageThe Interplay between Determinism and Stochasticity in Childhood Diseases. Am Nat 159, 469-481.
Débarre F, Bonhoeffer S & Regoes R (2007). external pageThe effect of population structure on the emergence of drug resistance during influenza pandemics. J. R. Soc. Interface 2007 4, 893-906.
Débarre F, Lenormand T & Gandon S (2009) external pageEvolutionary Epidemiology of Drug-Resistance in Space. PLoS Comput Biol 5(4): e1000337.
Rohani P et al (2009). external pageEnvironmental transmission of low pathogenicity avian influenza viruses and its implications for pathogen invasion. PNAS 106: 10365–10369.
Breban R et al. (2009). external pageThe Role of Environmental Transmission in Recurrent Avian Influenza Epidemics. PLoS Comput Biol 5(4): e1000346.
Ball F & Neal P (2002). external pageA general model for stochastic SIR epidemics with two levels of mixing. Math Biosci 180, 73-102.
Ball F & Neal P (2008). external pageNetwork epidemic models with two levels of mixing. Math Biosci 212, 69-87.

JavaScript has been disabled in your browser