Compartmental Models
Compartmental models have many shapes and sizes. They divide a population into distinct compartments — groups defined by their status with respect to a disease — and describe how individuals move between them over time. Despite their simplicity, compartmental models are one of the most powerful tools in infectious disease ecology and epidemiology.
The SIR model#
The classic example is the SIR model, which divides a population into three compartments:
- S — Susceptible: individuals who can become infected
- I — Infectious: individuals who are infected and can transmit
- R — Recovered (or removed): individuals who are no longer susceptible or infectious
Individuals flow from . The dynamics are governed by a system of ordinary differential equations:
where is the transmission rate, is the recovery rate, and is the total population size.
The basic reproduction number#
A key quantity derived from the model is the basic reproduction number, — the average number of secondary infections produced by a single infectious individual in a fully susceptible population. For the SIR model,
When , an outbreak can grow; when , it dies out.
Where does come from? Two short arguments give it — one counting infections directly, one falling out of the threshold for growth.
Show the derivation
Rate times duration. Drop a single infectious individual into an otherwise fully susceptible population, so and the susceptible fraction . That individual transmits by mass action at rate — that many new infections per unit time. Recovery is a constant-rate process ( leaves the infectious class per unit time), so the time spent infectious is exponentially distributed with mean
The expected number of secondary infections is the transmission rate multiplied by how long transmission lasts:
The threshold for growth. The same number governs whether the outbreak takes off, which is why is the dividing line. Early on , so the infectious equation
linearizes to
an exponential with growth rate . Infections grow when , i.e. when
Defining makes “the epidemic grows” and “” the same statement.
Both routes assume : is defined in a fully susceptible population. Once susceptibles deplete, the relevant quantity is the effective reproduction number , and the epidemic peaks exactly when falls to so that . For models with more than one infected compartment, this “rate times duration” bookkeeping is done with a matrix — see The Next-Generation Matrix and R₀.
Extensions#
The SIR framework extends naturally to capture more biological detail:
- SEIR — adds an Exposed (latent) compartment for diseases with an incubation period
- SIS — allows individuals to return to the susceptible class (no lasting immunity)
- SIRS — adds waning immunity, returning recovered individuals to susceptible
- Vital dynamics — births and deaths for longer time horizons
- Vector, spatial, and stochastic variants for more realistic systems
Analyzing model behavior#
To understand a model’s long-term behavior, we identify its equilibria and study their stability. This is done by linearizing the system and examining the Jacobian matrix, which shows how the SIR model can be analyzed at the disease-free equilibrium.
Related#
- Jacobians — stability analysis for the SIR model
- The Next-Generation Matrix and R₀
- Equilibria and Linear Stability
- Exponential and Logistic Growth
- Bifurcations — the threshold
- SEIR and Compartmental Extensions
- Within-Host Dynamics and the Immune Response
- Vector-Borne Disease Models
- Stochastic Epidemics and the Gillespie Algorithm
- The Effective Reproduction Number and Forecasting
- Fitting Dynamic Models to Data
- Pharmacokinetics: Compartment Models — the same compartment framework applied to drugs
- Mathematical Biology (BIO 301) — the course where these models are developed in depth