Compartmental Models in Epidemiology
Compartmental models in epidemiology partition a host population into mutually exclusive disease states governed by systems of ordinary or partial differential equations to quantify transmission dynamics, epidemic thresholds, and intervention efficacy.
Compartmental models in epidemiology are mathematical frameworks that stratify a host population into mutually exclusive subgroups—or compartments—defined by infection, immunity, and clinical status, tracking transitions between compartments over time through systems of deterministic differential equations or stochastic Markov chains. Originating in the early twentieth-century malaria transmission equations of Ronald Ross (1911) and formalized by William Ogilvy Kermack and Anderson Gray McKendrick in their landmark 1927 paper A Contribution to the Mathematical Theory of Epidemics, compartmental modeling provides the theoretical foundation of modern infectious disease epidemiology. By parameterizing per-capita transition rates governing infection acquisition, latency progression, recovery, waning immunity, and demographic turnover, these models derive threshold conditions such as the basic reproduction number (R0), forecast healthcare demand, and evaluate the population-level impact of vaccination and vector control programs.
Foundations of the Kermack–McKendrick SIR Framework
State Variables and Conservation of Population
In the canonical SIR (Susceptible–Infectious–Recovered) model, a closed, homogeneously mixing population of total size N is divided at calendar time t into three state variables:
- Susceptible (S(t)): Individuals who lack protective immunity and can acquire infection upon effective contact with an infectious host.
- Infectious (I(t)): Individuals currently harboring the pathogen and capable of transmitting it to susceptible contacts.
- Recovered or Removed (R(t)): Individuals who have cleared the infection and acquired sterilizing immunity (or have been removed from transmission through isolation or mortality).
Without demographic births or natural mortality (appropriate for acute epidemic waves spanning weeks to months), total population size remains constant (N = S(t) + I(t) + R(t)), and the dynamics follow the coupled nonlinear ordinary differential equations:
Here β denotes the effective transmission rate (the product of the per-capita contact rate c and the transmission probability per contact p), while γ denotes the per-capita recovery rate, corresponding to an exponentially distributed exp(−γτ) infectious period with mean duration D = 1 / γ.
Force of Infection (λ) and Mass-Action Scaling
The per-capita rate at which susceptible individuals acquire infection is termed the force of infection, denoted λ(t):
- Frequency-Dependent (Standard Incidence) Transmission: λ(t) = β (I(t) / N). Each host makes a fixed average number of contacts c per unit time regardless of total population size N, so the probability that a random contact is infectious equals the prevalence I / N. Standard incidence accurately describes human respiratory, enteric, and sexually transmitted infections across rural and metropolitan populations.
- Density-Dependent (Pseudo-Mass-Action) Transmission: λ(t) = βd I(t). The per-capita contact rate scales linearly with spatial host density, a regime often applied to wildlife zoonoses and agricultural plant epidemics.
Taxonomy of Epidemiological Compartmental Structures
Different pathogens require specialized compartment topologies to represent biological latency, lack of durable immunity, maternal antibody protection, or chronic carrier states:
| Model Class | Compartmental Flow | Key Transition Parameters | Representative Pathogens & Clinical Regimes |
|---|---|---|---|
| SIS | S → I → S | Transmission rate β; clearance rate γ without durable immunity | Neisseria gonorrhoeae, Chlamydia trachomatis, rhinovirus common colds |
| SIR | S → I → R | Transmission rate β; recovery rate γ conferring lifelong sterilizing immunity | Measles (Morbillivirus hominis), rubella, mumps, varicella |
| SEIR | S → E → I → R | Transmission β; latent progression σ (mean incubation 1/σ); recovery γ | Influenza A, SARS-CoV-2, Ebola virus disease, variola (smallpox) |
| SIRS | S → I → R → S | Transmission β; recovery γ; immunity waning rate ω (duration 1/ω) | Respiratory syncytial virus (RSV), seasonal coronaviruses, Bordetella pertussis |
| MSEIR | M → S → E → I → R | Passive maternal IgG decay δ (mean protection 1/δ ≈ 4–9 months); β, σ, γ | Childhood measles and rubella in high-birth-rate populations |
Latent Exposure (SEIR) and Endemic Demographic Equilibrium
In the SEIR formulation, newly infected individuals first enter the Exposed (E) compartment—infected but not yet shedding pathogen—before transitioning to the infectious state I at per-capita rate σ (mean latent period 1 / σ):
where μ is the per-capita demographic birth and natural mortality rate (mean host lifespan 1 / μ). Incorporating vital dynamics (μ > 0) replenishes the susceptible pool via new births, converting single-wave epidemic burnout into damped oscillations that converge to a stable endemic equilibrium whenever R0 = [β σ] / [(σ + μ)(γ + μ)] > 1. At endemic equilibrium, the fraction of the population remaining susceptible is pinned at the reciprocal of the basic reproduction number:
This relationship explains both the classic bell-shaped epidemic trajectory first observed empirically in Farr's laws and the herd immunity threshold pc = 1 − (1 / R0), the minimum immunized proportion required to reduce the effective reproduction number Rt below unity.
Age-Structured Contact Matrices and Heterogeneous Mixing
The WAIFW ("Who Acquires Infection From Whom") Matrix
Real human populations violate homogeneous mixing because children, working-age adults, and older adults interact assortatively within households, schools, and workplaces. Stratified compartmental models partition the population into K discrete age cohorts (analyzing longitudinal age and calendar cohorts akin to a Lexis diagram), replacing the scalar parameter β with an age-specific force of infection vector λi(t) for age group i:
where the K × K matrix B = [βij] is the Who Acquires Infection From Whom (WAIFW) matrix, parameterized empirically from social contact diary surveys such as the European POLYMOD study (Mossong et al., 2008). In age-structured or multi-patch systems, the overall basic reproduction number is computed as the dominant eigenvalue (spectral radius) of the Next-Generation Matrix K = F V−1 (Diekmann et al., 1990).
Deterministic Differential Equations vs. Discrete Stochastic Models
Because continuous ODEs treat S, I, and R as infinitely divisible real numbers, they cannot capture stochastic fade-out when case counts are small (I ≈ 1–10) or within small households. Under those conditions, epidemiologists replace deterministic flows with discrete-time chain-binomial formulations such as the Reed–Frost model or continuous-time Gillespie stochastic simulations built on principles of biostatistics.
Frequently Asked Questions
Why does an unmitigated SIR epidemic stop before 100% of the population is infected?
An epidemic wave peaks and begins declining as soon as the susceptible fraction S(t) / N drops below 1 / R0, where each infectious case produces fewer than one secondary case on average (Rt < 1). Because infectious individuals remain present at the peak, transmission continues during the descent phase ("epidemic overshoot") until the wave extinguishes at a final epidemic size Z∞ = 1 − exp(−R0 Z∞) that is strictly less than 100%.
How are non-exponentially distributed infectious periods modeled in ODE systems?
Standard SIR differential equations assume a constant hazard of recovery γ, which implies an exponentially distributed infectious duration exp(−γτ) with high variance. Using the method of stages (the "linear chain trick"), modelers split the E or I compartment into k sequential sub-compartments (I1 → I2 → ··· → Ik), each with transition rate kγ; the total infectious duration then follows a realistic Erlang (Gamma) distribution with mean 1 / γ and variance 1 / (k γ2).
References
- Kermack, W. O., & McKendrick, A. G. (1927). "A contribution to the mathematical theory of epidemics." Proceedings of the Royal Society of London. Series A, 115(772), 700–721. https://doi.org/10.1098/rspa.1927.0118
- 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
- Anderson, R. M., & May, R. M. (1991). Infectious Diseases of Humans: Dynamics and Control. Oxford University Press. https://doi.org/10.1093/oso/9780198545996.001.0001
- Hethcote, H. W. (2000). "The mathematics of infectious diseases." SIAM Review, 42(4), 599–653. https://doi.org/10.1137/S0036144500371907
- Mossong, J., Hens, N., Jit, M., Beutels, P., Auranen, K., Mikolajczyk, R., et al. (2008). "Social contacts and mixing patterns relevant to the spread of infectious diseases." PLOS Medicine, 5(3), e74. https://doi.org/10.1371/journal.pmed.0050074