Epiverse-TRACE Initiative, London School of Hygiene and Tropical Medicine, UK
2024-10-12
Diseases can be classified according to:
Note that these classifications are not mutually exclusive. Hence, a disease can be classified under more than one category at a time.
Pharmaceutical Interventions are medical interventions that target the pathogen or the host.
Examples:
Discussion
Discussion
How are these two uses impacted by accuracy, transparency, and flexibility?
Compartmental models are different from statistical models, which are used to describe the relationship between variables.
Other compartments can be added to the model to account for important events or processes (e.g., exposed, recovered, vaccinated, etc.)
It is, however, important to keep the model simple, less computationally intensive, and interpretable.
This model groups individuals into three disease states:
Susceptible (S): not infected but can be.
Infected (I): infected & infectious.
Recovered/removed (R): recovered & immune.
What drives transmission?
The transmission term is often defined through the force of infection (FOI), \(\lambda\).
Note
“Per capita” means the rate of an event occurring per individual in the population per unit of time.
The rate of contact between individuals is constant irrespective of the population density, \(\dfrac{N}{A}\), where \(N\) is the population size and \(A\) is the area occupied by the population.
Recall that transmission also depends on the probability of contact with an infected host, \(p\), which is assumed to be \(\dfrac{I}{N}\).
Hence, the frequency-dependent mass action is given by \(\lambda = \beta \times \dfrac{I}{N}\), where \(\beta\) is the transmission rate.
Question
Why does the frequency-dependent transmission contain \(\dfrac{1}{N}\) if it does not depend on the population density?
\(p\) is usually assumed to be the disease prevalence, \(\dfrac{I}{N}\).
Hence, the rate of new infections, \(\dfrac{dI}{dt} = S \times c \times \dfrac{I}{N} \times v\).
The rate of contact between individuals depends on the population density, \(\dfrac{N}{A}\).
Transmission also depends on \(p\) - the probability that a given contact is with an infected individual, often taken to be \(\dfrac{I}{N}\).
The density-dependent transmission is therefore given as \(\lambda = \beta \times \dfrac{I}{A}\).
Here, because transmission increases with the density of infected individuals, it is called density-dependent transmission.
Note
Notice that \(\lambda = \beta \times \dfrac{I}{N} \times \dfrac{N}{A}\) and the \(N's\) cancel out.
\(A\) is often ignored.
Density-dependent vs frequency dependent transmission
This is one of the most confused and debated concepts in disease modelling. Several studies have attempted to clarify it, including the brilliant work by Begon et al. (2002). Most of the clarifications provided here are based on this paper.
Recovery, governed by the recovery rate, \(\gamma\) (rate at which infected individuals recover and become immune).
If the duration of infection is \(\dfrac{1}{\gamma}\), then the rate at which infected individuals recover is \(\gamma\).
The average infectious period is often estimated from epidemiological data.
Note
You will learn about parameter estimation in the model fitting and calibration lectures.
Continuous time compartmental models are formulated using differential equations that describe the change in the number of individuals in each compartment over time.
The SIR model can be formulated as:
\[\begin{align*} \frac{dS}{dt} & = \dot{S} = \color{orange}{-\beta S I} \\ \frac{dI}{dt} & = \dot{I} = \color{orange}{\beta S I} - \color{blue}{\gamma I} \\ \frac{dR}{dt} & = \dot{R} = \color{blue}{\gamma I} \end{align*}\]
where \(\beta\) is the transmission rate, and \(\gamma\) is the recovery rate.
The initial conditions are given by:
\[\begin{equation*} \begin{aligned} S(0) & = N - 1,\\ I(0) & = 1, \text{and} \\ R(0) & = 0. \end{aligned} \end{equation*}\]
where \(N\) is the total population size.
Note
Mixing is homogeneous, i.e., individuals mix randomly:
Individuals have an equal probability of coming into contact with any other individual in the population.
Transition rates are constant and do not change over time.
Individuals acquire “lifelong” immunity after recovery.
Discussion
Compartmental models cannot be solved analytically.
We often perform two types of analyses to understand the long term dynamics of the model:
Note
Consider the case where \(I(0) = 1\) individual is introduced into a population of size \(N\) at time \(t = 0\).
That means in a completely susceptible population, we have \(S(0) = N - 1\) susceptible individuals.
At time 0, the disease will not spread if the rate of change of infections is negative, that is \(\dfrac{dI}{dt} < 0\).
Recall from the SIR model that \(\dfrac{dI}{dt} = \beta S I - \gamma I\).
Let’s solve this equation at \(t = 0\) by setting \(I = 1\), assuming \(\dfrac{dI}{dt} < 0\).
At \(t = 0\), we have
\[\begin{equation*} \frac{dI}{dt} = \beta S I - \gamma I < 0 \end{equation*}\]
Factor out \(I\), and we get
\[\begin{equation*} I (\beta S - \gamma) < 0 \end{equation*}\]
Since at \(t=0\)\(, I > 0\), we have \(S < \dfrac{\gamma}{\beta}\).
\(\dfrac{\gamma}{\beta}\) is the relative removal rate.
Interpretation:
For the SIR model, the quantity \(\dfrac{\beta}{\gamma}\) is called the reproduction number, \(R0\) (pronounced “R naught” or “R zero”).
The basic reproduction number, \(R0\), is the average number of secondary infections generated by a single primary infection in a completely susceptible population.
The basic reproduction number is a key quantity in infectious disease epidemiology.
\[ R0 \propto \dfrac{\text{Infection}}{\text{Contact}} \times \dfrac{\text{Contact}}{\text{Time}} \times \dfrac{\text{Time}}{\text{Infection}} \]
Numerical simulations can be performed with any programming language.
This course focuses on the R programming language because:
In R, we can use the {deSolve}
package to solve the differential equations.
To solve the model in R with {deSolve}
, we will always need to define at least three things:
sir.Rmd
.Discussion
Let’s relax the assumption about births and deaths in the population.
We will assume that the susceptible population is replenished with new individuals at a constant rate, \(\mu\).
We will also assume that everyone dies at a constant rate, \(\mu\).
Our model schematic now looks like this:
The model equations now become:
\[\begin{align} \frac{dS}{dt} & = \color{green}{\mu N} - \beta S I - \color{blue}{\mu} S \\ \frac{dE}{dt} & = \beta S I - \sigma E - \color{blue}{\mu} E \\ \frac{dI}{dt} & = \sigma E - \gamma I - \color{blue}{\mu} I \\ \frac{dR}{dt} & = \gamma I - \color{blue}{\mu} R \end{align}\]
Discussion
What is the \(R0\) of the SEIR model?
Beyond the SIR model, calculating \(R0\) for more complex models can be challenging due to the presence of multiple compartments.
For complex models, we use the next generation matrix approach (Diekmann, Heesterbeek, and Metz 1990; Diekmann, Heesterbeek, and Roberts 2010).
Note
Using the next generation matrix approach, we can show that the SEIR model with constant births and deaths has \[R0 = \dfrac{\beta \sigma}{(\gamma + \mu)(\sigma + \mu)}\].
We can use the same approach as the SIR model to simulate the SEIR model.
Modify the sir.Rmd
script to simulate the SEIR model.
Note
For a recap on the various control measures, refer to Section 1.2.
For a background on vaccination, refer to Section 1.2.1.1.
There are different types of vaccination strategies, including:
Let’s consider the case of mass/random vaccination.
Compartmental models can be extended to capture this by adding a new compartment, \(V\).
Let’s consider the SEIR model with vaccination.
The vaccinated compartment is:
not infectious and does not move to the exposed or infectious compartments.
replenished by the rate of vaccination, \(\eta\).
The model diagram and equations are as follows:
where \(\eta\) is the rate of vaccination.
Discussion
What are some of the assumptions of the SEIRV model?
What are the implications of these assumptions for the model’s predictions?
We can use the same approach as the SIR and SEIR models to simulate the SEIRV model.
Modify the seir.Rmd
script to simulate the SEIRV model.
For a background on non-pharmaceutical interventions, refer to Section 1.2.2.
Conceptually, NPIs usually act to either reduce the transmission rate, \(\beta\) or prevent infected individuals from transmitting.
NPIs like isolation, social distancing and movement restrictions can reduce the transmission rate, \(\beta\), by reducing the contact rate between susceptible and infectious individuals.
Hygiene measures reduce the probability of transmission per contact, thereby reducing the transmission rate, \(\beta\), since \(\beta = c \times p\).
Let’s consider two scenarios that will extend the SIR model to include NPIs:
NPIs such as social distancing, mask-wearing, and hand hygiene can reduce the transmission rate, \(\beta\).
We can model this by making the transmission rate a function of time, \(\beta (t)\).
The modified SIR model with a reduced transmission rate is as follows:
\[\begin{align*} \frac{dS}{dt} & = -\beta (t) S I \\ \frac{dI}{dt} & = \beta (t) S I - \gamma I \\ \frac{dR}{dt} & = \gamma I \end{align*}\]The simplest form is to reduce \(\beta\) by an NPI efficacy, say \(\epsilon\).
Assuming the NPI is implemented between \(t_{\text{npi\_start}}\) and \(t_{\text{npi\_end}}\), it means that \(\beta\) remains the same before that period and is modified to \((1- \epsilon)\beta\) during the period of the NPI, where \(0 \leq \epsilon \leq 1\).
With this knowledge, we can define \(\beta (t)\) mathematically as:
sir_npi.R
and follow along.In the previous example, we retained the SIR model structure and modified the transmission rate.
We can also model NPIs as compartments in the model. This is useful when we want to treat individuals affected by the NPIs differently.
For example, isolation is an NPI that prevents infected individuals from transmitting the disease.
This means that infected individuals in isolation do not contribute to the transmission of the disease and need to be removed from the infected compartment.
Moving isolated individuals to a separate compartment allows us to track them separately in the model and apply relevant parameters.
We can model this by introducing a new compartment, \(Q\), for isolating infected individuals.
Let’s assume, infected individuals move to the isolated compartment at a rate, \(\delta\).
Infected individuals in the isolated compartment do not transmit the disease.
The modified SIR model with isolated is as follows:
\[\begin{align*} \frac{dS}{dt} & = -\beta S I \\ \frac{dI}{dt} & = \beta S I - \gamma I - \delta I \\ \frac{dR}{dt} & = \gamma I + \tau Q \\ \frac{dQ}{dt} & = \delta I - \tau Q \end{align*}\]where \(\delta\) is the rate at which infected individuals move to the isolated compartment, and \(\tau\) is the rate at which individuals recover from isolation.
sir.Rmd
to incorporate the isolated compartment, \(Q\) and the relevant parameters.The models we have discussed so far assume that all individuals in the population are identical.
However, in reality, individuals differ in their susceptibility to infection and their ability to transmit the disease.
It is essential to capture this heterogeneity in the models in order for the models to be more realistic and useful for decision-making.
This can be captured by incorporating heterogeneity into the models.
Heterogeneity is often captured by stratifying the population into different groups.
For many infectious diseases, the risk of infection and the severity of the disease vary by age.
Hence, it is essential to capture age structure in the models.
To do this, we divide the population into different age groups and model the disease dynamics within each age group.
Let’s extend the SIR model to include age structure.
We will divide the population into \(n\) age groups.
Because the homogeneous model has 3 compartments, the age structured one will have \(3n\) compartments: \(S_1, I_1, R_1, S_2, I_2, R_2, ..., S_n, I_n, R_n\).
\[\begin{align*} \dfrac{dS_i}{dt} &= -\sum_{j=1}^{n} \beta_{ji} S_i I_j \\ \dfrac{dI_i}{dt} &= \sum_{j=1}^{n} \beta_{ji} S_i I_j - \gamma I_i \\ \dfrac{dR_i}{dt} &= \gamma I_i \end{align*}\]
The model can be used to study the impact of age structure on the dynamics of the epidemic.
For example, we can study the impact of vaccinating different age groups on the dynamics of the epidemic.
In the last two days, we have covered a lot of ground. Here are some key takeaways:
Infectious diseases are a major public health concern that can have devastating consequences.
Mathematical models are essential tools for studying the dynamics of infectious diseases and informing public health decision-making.
Models are simplifications of reality that help us understand complex systems.
We have discussed several compartmental models, including the SIR, SEIR, and SEIRV models.
The SIR model is a simple compartmental model that divides the population into three compartments: susceptible, infected, and recovered.
The SEIR model extends the SIR model by adding an exposed compartment.
We can model various pharmaceutical and non-pharmaceutical interventions (NPIs) by modifying the transmission rate or adding new compartments.
We have discussed the basic reproduction number, \(R0\), which is a key parameter in infectious disease epidemiology.
\(R0\) is the average number of secondary infections produced by a single infected individual in a completely susceptible population.
If \(R0 > 1\), the disease will spread in the population; if \(R0 < 1\), the disease will die out.
Deriving the basic reproduction number, \(R0\), is an essential step in understanding the dynamics of infectious diseases.
Deriving \(R0\) for the simple SIR model is simple as we just need to study the threshold phenomena.
For more complex models, we can use the next-generation matrix approach to derive \(R0\).
Often, homogeneous models are not sufficient to capture the complexity of infectious diseases.
Incorporating heterogeneity into the models is essential for capturing the complexity of infectious diseases.
Age structure is a common form of heterogeneity that can be incorporated into the models.
Other forms of heterogeneity include spatial, temporal, and contact heterogeneity.
James Mba Azam, PhD
Epiverse-TRACE Initiative, London School of Hygiene and Tropical Medicine, UK
Email: james.azam@lshtm.ac.uk
ORCID: 0000-0001-5782-7330
Social Media:
LinkedIn: James Azam
Twitter: james_azam
GitHub: jamesmbaazam
This presentation is made available through a Creative Commons Attribution 4.0 International License
Grassly, N. C., & Fraser, C. (2008). Mathematical models of infectious disease transmission. Nature Reviews Microbiology, 6(6), 477–487. https://doi.org/10.1038/nrmicro1845
Kirkeby, C., Brookes, V. J., Ward, M. P., Dürr, S., & Halasa, T. (2021). A practical introduction to mechanistic modeling of disease transmission in veterinary science. Frontiers in veterinary science, 7, 546651. https://www.frontiersin.org/articles/10.3389/fvets.2020.546651/full
Cobey, S. (2020). Modeling infectious disease dynamics. Science, 368(6492), 713–714. https://doi.org/10.1126/science.abb5659
Bjørnstad, O. N., Shea, K., Krzywinski, M., & Altman, N. (2020). Modeling infectious epidemics. Nature Methods, 17(5), 455–456. https://doi.org/10.1038/s41592-020-0822-z
Bodner, K., Brimacombe, C., Chenery, E. S., Greiner, A., McLeod, A. M., Penk, S. R., & Soto, J. S. V. (2021). Ten simple rules for tackling your first mathematical models: A guide for graduate students by graduate students. PLOS Computational Biology, 17(1), e1008539. https://doi.org/10.1371/journal.pcbi.1008539
Mishra, S., Fisman, D. N., & Boily, M.-C. (2011). The ABC of terms used in mathematical models of infectious diseases. Journal of Epidemiology & Community Health, 65(1), 87–94. https://jech.bmj.com/content/65/1/87
James, L. P., Salomon, J. A., Buckee, C. O., & Menzies, N. A. (2021). The Use and Misuse of Mathematical Modeling for Infectious Disease Policymaking: Lessons for the COVID-19 Pandemic. 41(4), 379–385. https://doi.org/10.1177/0272989X21990391
Holmdah, I., & Buckee, C. (2020). Wrong but useful—What COVID-19 epidemiologic models can and cannot tell us. New England Journal of Medicine. https://doi.org/10.1056/nejmp2009027
Metcalf, C. J. E. E., Edmunds, W. J., & Lessler, J. (2015). Six challenges in modelling for public health policy. Epidemics, 10(2015), 93–96. https://doi.org/10.1016/j.epidem.2014.08.008
Roberts, M., Andreasen, V., Lloyd, A., & Pellis, L. (2015). Nine challenges for deterministic epidemic models. Epidemics, 10(2015), 49–53. https://doi.org/10.1016/j.epidem.2014.09.006
Jones, J. H. (2011). Notes On R0. Building, 1–19. https://web.stanford.edu/\~jhj1/teachingdocs/Jones-on-R0.pdf
Diekmann, O., Heesterbeek, J. A. P., & Metz, J. A. J. (1990). On the definition and the computation of the basic reproduction ratio R0 in models for infectious diseases in heterogeneous populations. Journal of Mathematical Biology, 28(4), 365–382. https://doi.org/10.1007/BF00178324
epirecipes: Code for collate mathematical models of infectious disease transmission, with implementations in R, Python, and Julia.
Modeling Infectious Diseases in Humans and Animals: Code for the labelled programs in the book “Modeling Infectious Diseases in Humans and Animals”. They are generally available as C++, Fortran and Matlab files.