Compartmental models (epidemiology) Created 2026-10-13 Updated 2026-11-05
Compartmental models divide a biological population into states and specify transfers between them. A compartment might contain susceptible individuals, infective individuals or recovered individuals. The model must state what a compartment represents and whether its variable is a count or a fraction.
For a closed, homogeneously mixed SIR model, let and use force of infection and recovery rate . Then
Every transfer leaves one compartment and enters another, so summing the equations gives . This conservation of population follows from the specified closed model; demographic gains, deaths or external arrivals can change the total. An SEIR model adds an exposed state to distinguish infection from the ability to transmit.
A deterministic ordinary differential equation describes continuous compartment sizes. A stochastic epidemic model instead treats infection and recovery as random events between integer states. The latter can exhibit epidemic extinction even when the corresponding deterministic trajectory initially grows.
Force of infection Created 2026-09-24 Updated 2026-11-05
The force of infection is the instantaneous infection hazard experienced by a susceptible individual. Under homogeneous frequency-dependent mixing it is .
For frequency-dependent transmission with homogeneous mixing, each member of the susceptible compartment experiences force of infection . Consequently the total flow into the infectious compartment is people per unit time. The constant combines the contact frequency and the chance that a relevant contact causes infection, and has units of inverse time. Holding the infectious compartment's fraction fixed holds each person's force of infection fixed when changes. An unnormalized mass-action infection convention instead writes the total flow as , where has units of inverse person-time; these two coefficients must not be confused.
Let be the true seroprevalence at age , and the force of infection, meaning the instantaneous rate of a first infection among people still uninfected. In an irreversible serocatalytic model, people begin seronegative and retain detectable antibodies after infection. Their seronegative fraction obeys
Hence
Equivalently, where differentiation is possible, . This identifies the force of infection as a hazard function and as the survival function for remaining uninfected. For constant exposure , . A single calendar-time survey reflects each birth cohort's accumulated exposure; interpreting the same age curve as a timeless age effect requires assumptions about historical transmission.
Assume a constant annual force of infection across ages and calendar years. For independent sampled people with ages and binary results , fit
Applying the complementary log-log link gives
Therefore fit a binomial regression with the complementary log-log link, an intercept, and as an offset with coefficient fixed at one. Age is measured in years. An ordinary freely fitted coefficient of age, or even a freely fitted coefficient of , would describe a different exposure model. The annual force of infection estimate is
An infection-naive person's one-year infection probability is , which is approximately only when that rate is small.
The log-likelihood being maximized is, apart from constants,
A confidence interval for can be exponentiated to give a positive interval for . For groups of people at a common age , use with the same offset. If an age band is broad, use individual ages or average over the band's age distribution instead of treating its midpoint as exact. No numerical estimate is possible without the survey observations.
The biological interpretation assumes that immunoglobulin G positivity records previous infection, persists over the relevant ages, and is not substantially produced by maternal antibodies or vaccination. These are conditions to check, rather than conclusions from the fitted curve. Use known-positive and known-negative serum controls to assess the assay threshold, and validate specificity against relevant other infections. Cross-reactive antibodies to other flaviviruses can produce positive dengue virus serology, so a positive result need not be a marker specific to dengue virus exposure.[ref]
If independently established assay diagnostic sensitivity and diagnostic specificity are and , the observed positive probability is
Use that observation model in the binomial likelihood; it is generally no longer the simple intercept-plus-offset complementary log-log link fit. With only the stated survey, one cannot freely estimate , , antibody loss and an arbitrary infection history simultaneously. A single binary result also does not identify how many subsequent infections a person has experienced.
A susceptible person must have the same annual force of infection at every age. Thus the difference between age groups is their length of exposure, not an age-dependent infection hazard. To interpret one fitted constant as a historical annual force of infection, also assume that this common rate was sufficiently stable over the calendar years represented by the sampled birth cohorts. Otherwise an age pattern can reflect past outbreaks or cohort exposure, and the fitted constant is only a model-dependent summary. Representative sampling and comparable antibody detection across ages are additional conditions on interpreting the observed seroprevalence.
Before introduction there is no local infection exposure. Let years, using the actual elapsed time between introduction and sampling if exact dates are available. A lifelong resident aged has therefore had only
years of possible exposure. With a constant post-introduction force of infection , replace age by this exposure duration:
Fit the same binomial regression with as its offset. The predicted seroprevalence increases with age up to 19 and then reaches a plateau, since older residents all began local exposure at introduction.
This is equivalent to using a calendar-time force of infection of zero before 2005 and afterwards. With a changing post-introduction rate, the more general exposure is . Account separately for migration or infection acquired elsewhere, since current residence alone need not specify lifetime exposure. Subjects with exactly zero exposure have model probability zero and cannot be included by taking as an ordinary finite offset; handle them through the original probability model.
With susceptibility independent of size and infectivity proportional to size, define . The farm-size stratified SIR model is
An infectious size- farm has next-generation column . Its sole nonzero eigenvalue gives the basic reproduction number
again equal to the comparison SIR model.
Since every susceptible farm experiences the same force of infection, all ratios remain fixed. For a representative initial seed, and , uniqueness of the differential equations gives , , for all time. Consequently and
For this representative seed, the heterogeneous and homogeneous epidemics coincide exactly, and both susceptible and infected farm means stay at . This is the overlapping middle-column sketch above, not merely an approximation based on equal reproduction numbers.
With a nonrepresentative seed the susceptible mean remains its initial value, but the infected mean need not. The influx of new infectives has the constant susceptible mean, so
Thus it is pulled toward while incidence continues. Infectivity variation alone does not selectively remove large susceptible farms. The exact homogeneous reduction depends on the representative initial condition; specifying only and does not determine a trajectory for every possible seed.
The transition must be redefined. A constant gives each susceptible the same external infection pressure even when no infectious person remains. For influenza, the force of infection should depend on the current infectious prevalence. The progression and recovery can retain rates and .
Serocatalytic model 2026-10-20
An irreversible serocatalytic model describes the transition from seronegative to seropositive after infection. If the force of infection is and detectable antibodies persist, the seronegative fraction satisfies , hence seroprevalence is when . Antibody loss needs a reverse transition, and imperfect testing needs a separate observation model.