0% found this document useful (0 votes)
23 views16 pages

Epidemics Models and Data Using R Premium Ebook Download

The document is a preface and contents overview for a book titled 'Epidemics Models and Data using R,' which explores the relationship between models and data in infectious disease dynamics. It includes a variety of chapters that cover local disease dynamics, spatial dynamics, statistical methodologies, and practical examples using R programming. The author, Ottar N. Bjørnstad, expresses gratitude to collaborators and institutions that contributed to the development of the material presented in the book.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views16 pages

Epidemics Models and Data Using R Premium Ebook Download

The document is a preface and contents overview for a book titled 'Epidemics Models and Data using R,' which explores the relationship between models and data in infectious disease dynamics. It includes a variety of chapters that cover local disease dynamics, spatial dynamics, statistical methodologies, and practical examples using R programming. The author, Ottar N. Bjørnstad, expresses gratitude to collaborators and institutions that contributed to the development of the material presented in the book.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Epidemics Models and Data using R

Visit the link below to download the full version of this book:

[Link]

Click Download Now


For Katriona, Esme, and Michael
Preface

Despite an undergraduate degree in Zoology and an MSc on the behavior of voles,


I have long been fascinated by theoretical biology and the relationship between
models and data, and the feedback between statistical analysis and conceptual de-
velopments in the area of infectious disease dynamics, in particular, and ecological
dynamics in general. My perpetual frustration has been to read all the wonderfully
clever books and journal articles exuding all sorts of nifty maths and stats, but not
quite being able to do any of it myself when it came to infectious diseases that
I care about. This frustration led me to attempt to make myself some worked ex-
amples of all this cleverness. Over the years the stack of how-tos has grown, and
the following chapters are an attempt at organizing these so they may be useful for
others. I have tried to organize the chapters and sections in a reasonably logical
way: Chaps. 1–10 are a mix and match of models, data, and statistics pertaining to
local disease dynamics; Chaps. 11–13 pertain to spatial and spatiotemporal dynam-
ics; Chap. 14 highlights similarities between the dynamics of infectious disease and
parasitoid-host dynamics; finally, Chaps. 15 and 16 overview additional statistical
methodology I have found useful in studies of infectious disease dynamics. Some
sections are marked as “advanced” for one of two reasons: (1) either the maths or
stats is a bit more involved or (2) the topic in focus is a bit more esoteric. Although
not marked as such, most of Chap. 10 is advanced in this respect. While less run-of-
the-mill, I have thought it important to include these sections, because they cover
topics that may be less easy to find code for online.
I have had invaluable help from students, colleagues, and collaborators in my
quest. The preconference workshops of “Ecology and Evolution of Infectious Dis-
eases” that I co-taught between 2005 and 2008 enhanced my motivation to annotate
many worked examples; bare bones of several of the following sections were writ-
ten during frantic 24-h stints prior to these workshops. Much of the other material
arose from interactions with students and postdocs at Pennsylvania State Univer-
sity’s Center for Infectious Disease Dynamics (CIDD). Parts of the epidemics on
networks and the R0 removal estimator is from Matt Ferrari’s PhD research, and the
age-structured SIR simulator and the SIRWS model are from Jennie Lavine’s PhD

vii
viii Preface

work. Working with distributed-delay models has been a collaboration with Bill Nel-
son and my students Lindsay Beck-Johnson and Megan Greischar. Angie Luis and I
cooked up the R code to do transfer functions as part of her PhD research. Much of
the code on the catalytic model is from collaborations with Laura Pomeroy and then
CIDD postdoctoral fellows Grainne Long and Jess Metcalf. The in-host TSIR was
also a collaboration with Jess. The Gillespie code arose from collaborations with
postdoctoral fellow Shouli Li and my honor student Reilly Mummah. Reilly also
taught me how to write my first Shiny app. Away from Penn State, Aaron King
and Ben Bolker have at various times been unbelievably patient in teaching me
bits of maths I did not understand. Roger Nisbet painstakingly guided me through
my first transfer functions during my postdoctoral fellowship at NCEAS. During
the same period, Jordi Bascompte introduced me to coupled map lattice models.
Finally, Bryan Grenfell showed me wavelets and introduced me to the field of infec-
tious disease dynamics some 20 years ago.
The data used has been kindly shared by Janis Antonovics, Jeremy Burdon, Re-
becca Grais, Sylvije Huygen, Jenn Keslow, Sandy Leibhold, Grainne Long, and
Mary Poss. The first draft of the text was completed while I was on sabbatical at the
University of Western Australia and University of Oslo/the Norwegian Veterinary
Institute during 2017. My work leading up to this text has variously been funded by
the National Science Foundation, the National Institutes of Health, the US Depart-
ment of Agriculture, and the Bill and Melinda Gates Foundation.

University Park, PA, USA Ottar N. Bjørnstad


May 2018
Contents

1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 Preamble . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 In-Host Persistence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Patterns of Endemicity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.4 R ..................................................... 6
1.5 Other Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

2 SIR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.1 The SIR Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2 Numerical Integration of the SIR Model . . . . . . . . . . . . . . . . . . . . 11
2.3 Final Epidemic Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.4 Open Epidemic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.5 Phase Analyses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
2.6 Stability and Periodicity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.7 Advanced: More Realistic Infectious Periods . . . . . . . . . . . . . . . . 23
2.8 ShinyApp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

3 R0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
3.1 Primacy of R0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
3.2 Preamble: Rates and Probabilities . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.3 Estimating R0 from a Simple Epidemic . . . . . . . . . . . . . . . . . . . . . 33
3.4 Maximum Likelihood: The Chain-Binomial Model . . . . . . . . . . . 35
3.5 Stochastic Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
3.6 Further Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
3.6.1 Influenza A/H1N1 1977 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
3.6.2 Ebola Sierra Leone 2014–2015 . . . . . . . . . . . . . . . . . . . . . . 43
3.6.3 Ebola DRC 1995 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
3.7 R0 from S(E)IR Flows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
3.8 Other Rules of Thumb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
3.8.1 Mean Age of Infection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

ix
x Contents

3.8.2 Final Epidemic Size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49


3.8.3 Contact Tracing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
3.9 Advanced: The Next-Generation Matrix . . . . . . . . . . . . . . . . . . . . 51
3.9.1 SEIR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
3.9.2 SEIHFR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

4 FoI and Age-Dependent Incidence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57


4.1 Burden of Disease . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
4.2 Force of Infection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
4.3 Probability of Infection at Age: The Catalytic Model . . . . . . . . . . 59
4.4 More Flexible φ -Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
4.5 A Log-Spline Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
4.6 Rubella . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
4.7 WAIFW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
4.8 Advanced: RAS Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76

5 Seasonality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
5.1 Environmental Drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
5.2 The Seasonally Forced SEIR Model . . . . . . . . . . . . . . . . . . . . . . . . 84
5.3 Seasonality in β . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
5.4 Bifurcation Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
5.5 Stroboscopic Section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
5.6 Susceptible Recruitment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
5.7 ShinyApp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94

6 Time-Series Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
6.1 Taxonomy of Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
6.2 Time Domain: ACF and ARMA . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
6.2.1 ARMA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
6.3 Frequency Domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
6.4 Wavelets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
6.5 Measles in London . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
6.6 Project Tycho . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
6.7 Lomb Periodogram: Whooping Cough . . . . . . . . . . . . . . . . . . . . . . 107
6.8 Triennial Cycles: Philadelphia Measles . . . . . . . . . . . . . . . . . . . . . 108
6.9 Wavelet Reconstruction and Wavelet Filter: Diphtheria . . . . . . . . 111
6.10 Advanced: FFT and Reconstruction . . . . . . . . . . . . . . . . . . . . . . . . 114

7 TSIR ....................................................... 117


7.1 Stochastic Variability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
7.2 Estimating Parameters in Dynamic Models . . . . . . . . . . . . . . . . . . 120
7.3 Estimation Using the TSIR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
7.3.1 Inference (Hypothetical) . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
7.4 Inference (for Real) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
7.4.1 Susceptible Reconstruction . . . . . . . . . . . . . . . . . . . . . . . . . 122
7.4.2 Estimation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
Contents xi

7.5 Simulating the TSIR Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127


7.6 Tycho Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
7.7 In-Host Malaria Dynamics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
7.8 ShinyApp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135

8 Trajectory Matching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137


8.1 Preamble: Prevalence Versus Incidence . . . . . . . . . . . . . . . . . . . . . 137
8.2 Event-Based Stochastic Simulation . . . . . . . . . . . . . . . . . . . . . . . . . 137
8.3 Trajectory Matching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
8.4 Likelihood Theory 101 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
8.5 SEIR with Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
8.6 Boarding School Flu Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149
8.7 Measles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
8.8 Outbreak-Response Vaccination . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
8.9 ShinyApp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156

9 Stability and Resonant Periodicity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159


9.1 Preamble: Rabies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
9.2 Linear Stability Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
9.3 Finding Equilibria . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
9.4 Evaluating the Jacobian . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
9.5 Raccoon Rabies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
9.6 Influenza . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
9.7 Advanced: Transfer Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
9.7.1 SIR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
9.7.2 The TSIR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
9.8 (Even More) Advanced: Transfer Functions and ARMA
Delay-Coordinates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
9.9 ShinyApp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178

10 Exotica . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
10.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
10.2 Chaos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
10.3 Local Lyapunov Exponents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
10.4 Coexisting Attractors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
10.5 Repellors/Unstable Manifolds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
10.6 Invasion Orbits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
10.7 Stochastic Resonance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
10.8 Predictability: Empirical Dynamic Modeling . . . . . . . . . . . . . . . . . 203
Appendix: Making a Pomp-Simulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205

11 Spatial Dynamics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209


11.1 Dispersal Kernels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
11.2 Filipendula Rust . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
11.3 Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
11.4 Gypsy Moth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
xii Contents

11.5 Coupled Map Lattice SI Models . . . . . . . . . . . . . . . . . . . . . . . . . . . 217


11.6 Making Movies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
11.7 Nonparametric Covariance Functions for Spatiotemporal Data . . 220
11.8 Gravity Models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222

12 Transmission on Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227


12.1 S Preamble: Objects, Classes, and Functions . . . . . . . . . . . . . . . . . 227
12.2 Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
12.3 Models of Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
12.3.1 Watts-Strogatz Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
12.3.2 Barabasi-Albert Networks . . . . . . . . . . . . . . . . . . . . . . . . . . 233
12.4 Epidemics on Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234

13 Spatial and Spatiotemporal Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . 241


13.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
13.2 A Plant-Pathogen Case Study . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
13.3 Spatial Autocorrelation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
13.4 Testing and Confidence Intervals . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
13.5 Mantel Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
13.6 Correlograms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
13.7 Nonparametric Spatial Correlation Functions . . . . . . . . . . . . . . . . 247
13.8 LISA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
13.9 Cross-Correlations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
13.10 Gypsy Moth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252

14 Parasitoids . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
14.1 Parasitoid-Host Dynamics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
14.2 Stability and Resonant Periodicity . . . . . . . . . . . . . . . . . . . . . . . . . 260
14.3 Biological Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
14.4 Larch Bud Moth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263
14.5 Host-Parasitoid Metapopulation Dynamics . . . . . . . . . . . . . . . . . . 263
14.6 ShinyApp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265

15 Non-independent Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267


15.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
15.2 Spatial Dependence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
15.2.1 Random Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
15.2.2 Spatial Regression . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
15.3 Repeated Measures of In-Host Mouse Malaria . . . . . . . . . . . . . . . 273
15.4 B. bronchiseptica in Rabbits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279

16 Quantifying In-Host Patterns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283


16.1 The Experiments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
16.2 Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
16.3 PCA of FIV Day 31 and 59 Data . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
16.4 LDA of FIV Day 31 and 59 Data . . . . . . . . . . . . . . . . . . . . . . . . . . 286
Contents xiii

16.5 MANOVA of FIV Day 59 Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290


16.6 PCA of Mouse Malaria . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
16.7 FDA of Mouse Malaria . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293

References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
Chapter 1
Introduction

1.1 Preamble

The use of mathematical models to understand infectious disease dynamics has a


very rich history in epidemiology. Kermack and McKendrick (1927) is the seminal
paper that introduced the equations for the general Susceptible-Infected-Removed
model and showed how a set of restrictive assumptions lead to the standard SIR
model of ordinary differential equations. During the 1950s and early 1960s stochas-
tic theories of disease dynamics were developed by Bailey (1957) and Bartlett
(1960b). Bartlett (1956, 1960a) further pioneered the use of Monte Carlo simula-
tions of epidemics with the aid of “electronic computers” (as opposed to regular
human computers), while Muench (1959) proposed the “catalytic” framework for
understanding age-incidence patterns.1 The decades to follow saw broad expansions
of theories as well as a surge in real-life application of mathematics to dynamics and
control of infectious disease.
There are several excellent textbooks of mathematical epidemiology including
Anderson and May (1991) and Keeling and Rohani (2008). The purpose of the cur-
rent text is not to replicate these efforts but rather use these frameworks as a starting
point to discuss practical implementation and analysis. The discussion will be cen-
tered around a somewhat haphazard collection of case studies selected to explore
various conceptual, mathematical, and statistical issues. The text is designed to be
more of a “practicum in infectious disease dynamics.”
The dynamics of infectious diseases shows a wide diversity of pattern. Some
have locally persistent chains-of-transmission; others persist spatially in “consumer-
resource metapopulations.” Some infections are prevalent among the young, some
among the old, and some are age-invariant. Temporally, some diseases have little

1 Though, as reviewed by Dietz and Heesterbeek (2002), the original calculations leading to the
catalytic model was proposed by Daniel Bernoulli in the late eighteenth century.

© Springer Nature Switzerland AG 2018 1


O. N. Bjørnstad, Epidemics, Use R!, [Link] 1
2 1 Introduction

variation in prevalence, some have predictable seasonal shifts, and others exhibit
violent epidemics that may be regular or irregular in their timing. Models and
“models-with-data” have proved invaluable for understanding and predicting this
diversity, and thence help improve intervention and control. The following chapters
are an attempt at providing some notes for a “field guide” for working with data,
models, and “models-and-data” to understand epidemics and infectious disease dy-
namics in space and time.

1.2 In-Host Persistence

Infectious diseases can be classified according to their persistence within the host
and attack rates with respect to age. Some infections result in life-long colonization
of a host because the immune system does not clear them. Such “in-host persistence”
may be because the immune system permits it—as for the many symbionts that are
beneficial to the host (viz. commmensals and mutualists)—or because detrimental
symbionts (viz. pathogens) are able to evade clearance. Examples of “in-host persis-
tent” pathogens are retroviruses such as HIV, latent viruses such as, herpes viruses,
and a number of bacteria such as the causative agents of tuberculosis (Mycobac-
terium tuberculosis) and leprosy (M. leprae).
“Acute” infections, in contrast, result in transient colonization of the host—that
in humans can last for days or months depending on the pathogen—followed by
clearance. The clearance is usually immune-mediated, though some viruses like ca-
nine distemper virus may run out of target cells and some pathogens may have
a programmed life cycle within the host. Some coccidian pathogens within the
genus Eimeria, for example, go through an exact number of replication cycles in
the host (as merozoites) before all pathogen cells are expelled into the environment
(as oocysts). The more common example of transience is due to immune-mediated
clearance. Examples are plentiful and include acute viruses like measles and in-
fluenza, bacteria such as many that causes respiratory disease like bacterial menin-
gitis (e.g., Neisseria meningitidis) or whooping cough (Bordetella pertussis and B.
parapertussis), and protozoans such as those that cause malaria (Plasmodium spp.).
Among the acute infections we further distinguish between those that leave ster-
ilizing immunity following clearance versus those that leave no or short-lived im-
munity. This can happen via a number of mechanisms including variable gene ex-
pression, rapid evolution, co-circulating strain clouds, or other immune evasive ma-
neuvers. N. meningitidis and its congener N. gonorrhoeae (which cause gonorrhea),
for example, are thought to leave little effective immune memory because of the
bacteria’s ability to express a very variable arsenal of surface proteins (e.g., Stern
1.2 In-Host Persistence 3

et al. 1984; Tettelin et al. 2000). Many influenza subtypes, in contrast, render ef-
fective immune memory short-lived because of rapid evolution; high mutation rates
lead to “antigenic drift” and viral recombination during coinfection leads to anti-
genic “shifts.” Plasmodium falciparum is thought to be comprised of a diverse set
of strains with nonoverlapping “antigenic repertoires” (as well as variable antigen
expression) that allows repeat reinfection (e.g., Gupta et al. 1998). A number of
common viral afflictions of children have a somewhat more limited strain diversity
that may allow several reinfection cycles, but the immune system is ultimately able
to cover their antigenic space; Examples include rotavirus (Pitzer et al. 2011) and
the enterovirus-complex that cause hand-foot-and-mouse disease (Takahashi et al.
2016). Finally, many pathogens have various “anti-immune devices.” Respiratory
syncytial virus, for example, uses molecular decoys against neutralizing antibodies
(Bukreyev et al. 2008) and Bordetella pertussis employs the pertussis toxin to, at
least transiently, inhibit recruitment of immune effector cells to sites of infection
(Kirimanjeswara et al. 2005).
Many of the remaining “acute, immunizing pathogens”—the ones that result
in a transient infection followed by life-long sterilizing immunity—are the poster
children of mathematical epidemiology. Notable examples are among the classic
vaccine-preventable viruses like measles, rubella, and smallpox. From a biolog-
ical point of view, the complete failure of immune escape of these pathogens is
somewhat mysterious (Kennedy and Read 2017), but the resulting simple dynam-
ical clockwork is a joy to anyone hoping to apply mathematics to understand the
living world.
From an epidemiological point of view, it is important to make the functional—as
opposed to taxonomical—classification of pathogens because it allows us to under-
stand the differences in age-specific attack rates and contrasting disease dynamics.
The acute, immunizing infections mainly circulate among the young and therefore
comprise the many “childhood” infections because most or all older hosts are im-
mune. From the point of view of the compartmental “SIR-like” formalism (Fig. 1.1),
it is thus natural to divide the host population in S, I, and R compartments and as-
sume a unidirectional flow from susceptible children through immune (“removed”)
adults. In contrast, the prevalence of “in-host persistent” infections will tend to ac-
cumulate with age. With respect to the SIR formalism, it is thus natural to consider
a model with a unidirectional flow from the S class to a terminal I class. The acute
but imperfectly immunizing infections should lead to relatively age-invariant attack
rates, and S → I → S or S → I → R → S flows depending on the duration of immune
protection.
The SIR-like framework predicts how the broad expectation for age-prevalence
curves will be modulated by factors such as age-specific pattern of mixing and
differential mortality between infected and noninfected individuals. Statistical epi-
demiology can thus be used to probe empirical patterns to discover subtleties in the
dynamics of disease transmission that is hard to observe directly.
4 1 Introduction

1.3 Patterns of Endemicity

We can classify the dynamics of infectious disease according to broad “patterns of


endemicity.” First, there is the distinction between locally persistent vs locally non-
persistence pathogens. Local persistence fails when a local chain-of-transmission
breaks. This can happen for two very different reasons (Fig. 1.1): (i) The transmis-
sion bottleneck is when a pathogen is insufficiently transmissible to sustain a chain
of transmission; (ii) at the opposite end of the spectrum is the susceptible bottle-
neck for acute pathogens that are so transmissible that they burn through suscepti-
bles much faster than they are replenished. In measles, for example, prevaccination
cities in the USA smaller than a critical community size (CCS) of 250k–500k people
did not produce enough children to sustain a local chain-of-transmission (Bartlett
1960a) (Fig. 1.2). Recurrence of such pathogens typically involves spatial dynamics
and persistence at the metapopulation scale through spread among asynchronous
local host communities (Keeling et al. 2004) or core-satellite dynamics in which a
few large cities above the CCS serve as persistent sources for spatial dissemination
to communities below the CCS (Grenfell and Harwood 1997; Grenfell et al. 2001).
The 1988 and 2002 epidemics of a related morbilli virus, the phocine distem-
per virus, in European harbor seals is another illustrations of locally non-persistent
infections due to high transmission relative to susceptible recruitment rates (e.g.,
Swinton 1998). Following introduction into each local population (“haul-out”), ex-
plosive local epidemics terminated after 1–4 months due to susceptible depletion.
When such epidemics happens so fast that recruitment of susceptibles (through
birth, immigration, or loss of immunity) is negligible during the course of the out-
break we call it a “closed epidemics.” The closed epidemic is the focus of the stan-
dard Susceptible-Infected-Recovered model which we will study in Chap. 2. At the
opposite end of the transmissibility spectrum, pathogens may bottleneck because
transmission is too ineffective. In particular, if the basic reproductive ratio (R0 , the

Birth / loss of
(ii)
immunity
(i)
Susceptible Infected Recovered Susceptible
S I R S
Fig. 1.1 The two bottlenecks for local persistence: (i) the transmission bottleneck for poorly trans-
mitted infections and (ii) the susceptible bottleneck for highly transmissible, acute immunizing (or
lethal) pathogens
1.3 Patterns of Endemicity 5

expected number of secondary cases from a primary case in a completely susceptible


population) is smaller than one, we see stuttering (“subcritical”) chains of transmis-
sion followed by pathogen fade-out. We see this in many zoonoses such as mon-
key pox and nipah (stage 3 zoonoses in the classification by Lloyd-Smith et al.
2009). Persistent recurrence of these typically involves reservoir host and intermit-
tent zoonotic reintroduction. For example, in their study of Lassa fever in Sierra
Leone, Iacono et al. (2015) concluded that about 20% of the human cases were
caused by human-to-human transmission (with an average reproductive ratio below
one) while the remaining majority was caused by transmission from the multimam-
mate rat (Mastomys natalensis) reservoir.
100
80
Percent of time extinct
60
40
20
0

5e+02 5e+03 5e+04 5e+05


Community size

Fig. 1.2 Persistence of measles against population size for 954 cities and villages in pre-
vaccination England and Wales (1944–1964). Communities below 500k exhibited occasional or
frequent (depending on size) local extinction of the virus

The locally persistent infections can be classified as: (1) Stable endemics that
show little variation in incidence through time. Many STDs with SI and SIS-like
dynamics like gonorrhea (Fig. 1.3a) and HIV exhibit this pattern. (2) Seasonal en-
demics that show low’ish-level predictable seasonal variation around some mean.
Many endemic vector-borne and water-borne infections exhibit this pattern. A clas-
sic example is the seasonal two-peaked mortality rate from Cholera in the province
6 1 Introduction

of Dacca, East Bengal (King et al. 2008); The first peak at the beginning of the mon-
soon season and the second towards the end (Fig. 1.3b). Finally, (3) recurrent epi-
demics that may be regular or irregular are characterized by violent epidemic fluc-
tuations over time. Many acute, immunizing highly contagious pathogens—measles
being the poster-child—follow this pattern (Fig. 1.4).
100 120

1500
80

1000
Cases

Deaths
60
40

500
20

0
0

2006 2008 2010 2012 2014 Au Oc De Fe Ap Ju


Year Month
(a) (b)
Fig. 1.3 Incidence of (a) weekly incidence of gonorrhea in Massachusetts (2006–2015) and (b)
monthly average (± SE) mortality from cholera in the Dacca district (1891–1940)

1.4 R

To provide a cohesive framework for the practical calculations, all analyses are done
in the open-source R-program. The text is written assuming a basic knowledge of
this platform. All functions, data, and ShinyApp’s discussed in the text are contained
in the epimdr-package. With the package everything contained herein should be
reproducible. The above Figs. 1.2 and 1.4 were for example generated using the
following code:

#Fig 1.2
data(ccs)
plot(ccs$size, ccs$ext*100, log="x", xlab=
"Community size", ylab="Percent
of time extinct")

#Fig 1.3a
plot(magono$time, magono$number, ylab="Cases",
xlab="Year")
lines(lowess(x=magono$time, y=magono$number, f=.4))
1.4 R 7

Liverpool New York


3 12

10

2 8
Cases (x 10-3)

1 4

0 0
44 46 48 50 52 54 56 58 44 46 48 50 52 54 56 58
London Baltimore
14 5
12
4
Cases (x 10-3)

10
3
8
6 2
4
1
2
0 0
44 46 48 50 52 54 56 58 44 46 48 50 52 54 56 58
year year

Fig. 1.4 Incidence of measles in various US and UK cities during the pre-vaccination era. The data
represent fortnightly incidence (roughly corresponding to the virus’ serial interval). The vertical
bars mark annual intervals

#Fig 1.3b
data(cholera)
ses=sesdv=rep(NA, 12)
ses[c(7:12, 1:6)]=sapply(split(cholera$Dacca,
cholera$Month), mean, [Link]=TRUE)
sesdv[c(7:12, 1:6)]=sapply(split(cholera$Dacca,
cholera$Month), sd, [Link]=TRUE)/
sqrt(length(split(cholera$Dacca, cholera$Month)))
require(plotrix)
plotCI(x=1:12, y=ses, ui=ses+sesdv, li=ses-
sesdv, xlab="Month", ylab="Deaths")
lines(x=1:12, y=ses)

You might also like