Algorithm Search⌘K

Techniquecore

Next-generation matrix

Also called next-generation operator, van den Driessche-Watmough method.

Compute R0 of a model with several infected classes as the spectral radius of F V^(-1), from new infection and transition terms.

The next-generation matrix is the standard technique to compute the basic reproduction number R0R_0 of a compartmental epidemic model with more than one infected class. Write the equations of the infected classes near the disease-free state as new infections minus all other flows, take the two Jacobians FF and VV, and form K=FV−1K = F V^{-1}. Entry KijK_{ij} is the expected number of new infections in class ii caused by one individual that enters class jj. Then R0=ρ(K)R_0 = \rho(K), the spectral radius. Diekmann, Heesterbeek and Metz (1990) gave the definition for general heterogeneous populations, and van den Driessche and Watmough (2002) gave the recipe with FF and VV for ODE models.

In plain words

Sort the infected people by type: by age, by place, by stage of disease, or by host species. For each type, ask how many new cases of each type one case of that type makes during its whole infection, if everyone else can still catch the disease. Put these numbers in a square table. One generation of cases, listed by type, times the table gives the next generation. After a few generations, the mix of types settles down, and each generation is a fixed multiple of the one before. That multiple is the reproduction number. You find it as the largest eigenvalue of the table. The work is in filling the table: you must separate the events that make a new case from the events that only move a case from one type to another.

When it applies

  • The model is a system of ODEs, and some of its classes hold infected individuals, x=(x1,…,xm)x = (x_1, \ldots, x_m).
  • There is a disease-free equilibrium x0x_0, with all infected classes at zero.
  • The equations of the infected classes can be split as dx/dt=F(x)−V(x)dx/dt = \mathcal{F}(x) - \mathcal{V}(x), where Fi\mathcal{F}_i is the rate at which new infections appear in class ii, and Vi=Vi−−Vi+\mathcal{V}_i = \mathcal{V}_i^- - \mathcal{V}_i^+ is the rate of transfers out of class ii minus the rate of transfers into it by any other means.
  • The conditions of van den Driessche and Watmough (2002) hold. In short: all rates are non-negative, nothing leaves an empty class, there are no new infections without infected individuals, and without new infections the infected classes decay to zero. The last condition makes VV invertible with V−1≥0V^{-1} \ge 0 entrywise.

The same idea works for discrete-time models, for models with continuous structure such as age or time since infection (where KK becomes an integral operator), and for networks of patches.

The template

  1. List the infected classes. These are all the classes with infected individuals, infectious or not: E and I in SEIR, infected humans and infected mosquitoes in a vector model.
  2. Split each equation. For each infected class, write Fi\mathcal{F}_i (new infections only, from susceptibles) and Vi\mathcal{V}_i (deaths, recovery, progression from one infected class to another, travel).
  3. Linearize at the disease-free state.
F=[∂Fi∂xj(x0)],V=[∂Vi∂xj(x0)].F = \left[ \frac{\partial \mathcal{F}_i}{\partial x_j}(x_0) \right], \qquad V = \left[ \frac{\partial \mathcal{V}_i}{\partial x_j}(x_0) \right].

FF is non-negative. VV has a positive diagonal and non-positive off-diagonal entries, and V−1V^{-1} is non-negative. 4. Form the matrix. K=FV−1K = F V^{-1}. Entry (V−1)kj(V^{-1})_{kj} is the expected time spent in class kk by an individual that enters infected class jj, and FikF_{ik} is the rate of new infections in class ii caused by an individual in class kk; the sum over kk is KijK_{ij}. 5. Take the spectral radius. R0=ρ(K)R_0 = \rho(K). By the Perron-Frobenius theorem, ρ(K)\rho(K) is an eigenvalue of KK with a non-negative eigenvector, the distribution of types in a growing epidemic. For a 2×22 \times 2 matrix, ρ(K)=(tr⁡K+(tr⁡K)2−4det⁡K)/2\rho(K) = \left(\operatorname{tr} K + \sqrt{(\operatorname{tr} K)^2 - 4 \det K}\right) / 2. For larger matrices, use power iteration or a general eigenvalue solver. 6. Read off the threshold. Under the conditions above, the disease-free equilibrium is locally asymptotically stable if R0<1R_0 < 1 and unstable if R0>1R_0 > 1 (van den Driessche and Watmough 2002, Theorem 2).

A quick bound. For a non-negative matrix, ρ(K)\rho(K) lies between the smallest and the largest column sum, and also between the smallest and the largest row sum. This is a useful check on a computed value.

Classic examples

SEIR with births. The infected classes are (E,I)(E, I). New infections enter E at the rate βSI/N\beta S I / N, which is βI\beta I at S=NS = N. Progression σE\sigma E from E to I is a transfer, not a new infection.

F=(0β00),V=(σ+μ0−σγ+μ),K=(βσ(σ+μ)(γ+μ)βγ+μ00).F = \begin{pmatrix} 0 & \beta \\ 0 & 0 \end{pmatrix}, \quad V = \begin{pmatrix} \sigma + \mu & 0 \\ -\sigma & \gamma + \mu \end{pmatrix}, \quad K = \begin{pmatrix} \dfrac{\beta \sigma}{(\sigma + \mu)(\gamma + \mu)} & \dfrac{\beta}{\gamma + \mu} \\ 0 & 0 \end{pmatrix}.

KK is triangular, so R0=βσ/((σ+μ)(γ+μ))R_0 = \beta \sigma / ((\sigma + \mu)(\gamma + \mu)). See the SEIR model.

Two groups, by power iteration. Two groups of equal size mix unevenly, and K=(3110.5)K = \begin{pmatrix} 3 & 1 \\ 1 & 0.5 \end{pmatrix} is given directly. The column sums are 4 and 1.5, so 1.5≤R0≤41.5 \le R_0 \le 4. Power iteration from v=(1,1)v = (1, 1), scaled so that the first entry is 1 after each step:

step KvK v estimate of ρ\rho next vv
1 (4,1.5)(4, 1.5) 4 (1,0.375)(1, 0.375)
2 (3.375,1.1875)(3.375, 1.1875) 3.375 (1,0.351852)(1, 0.351852)
3 (3.351852,1.175926)(3.351852, 1.175926) 3.351852 (1,0.350829)(1, 0.350829)
4 (3.350829,1.175414)(3.350829, 1.175414) 3.350829 (1,0.350784)(1, 0.350784)

The exact value is (3.5+10.25)/2≈3.350781(3.5 + \sqrt{10.25})/2 \approx 3.350781. The second eigenvalue is about 0.149, so the error shrinks by a factor of about 0.149/3.351≈0.0450.149 / 3.351 \approx 0.045 per step.

A vector-borne disease. In the Ross-Macdonald model, with HIH_I infected humans out of HH and MIM_I infected mosquitoes out of M=mHM = m H, the infected classes are (HI,MI)(H_I, M_I):

dHIdt=abMIH−HIH−rHI,dMIdt=acHIH(M−MI)−gMI.\frac{dH_I}{dt} = a b M_I \frac{H - H_I}{H} - r H_I, \qquad \frac{dM_I}{dt} = a c \frac{H_I}{H} (M - M_I) - g M_I .

Here aa is the biting rate, bb and cc are the probabilities of transmission per bite from mosquito to human and from human to mosquito, rr is the human recovery rate and gg is the mosquito death rate. At the disease-free state,

F=(0abacm0),V=(r00g),K=(0ab/gmac/r0).F = \begin{pmatrix} 0 & a b \\ a c m & 0 \end{pmatrix}, \quad V = \begin{pmatrix} r & 0 \\ 0 & g \end{pmatrix}, \quad K = \begin{pmatrix} 0 & a b / g \\ m a c / r & 0 \end{pmatrix}.

So R0=ρ(K)=ma2bc/(rg)R_0 = \rho(K) = \sqrt{m a^2 b c / (r g)}. The entry mac/rm a c / r counts mosquitoes infected by one human, and ab/ga b / g counts humans infected by one mosquito. The square root appears because one generation in KK is one leg, from human to mosquito or from mosquito to human; van den Driessche (2017) describes it as the geometric mean of the two legs. The product ma2bc/(rg)m a^2 b c / (r g), the diagonal entry of K2K^2, counts human cases per human case and is the classical R0R_0 of Macdonald. With m=2m = 2, a=0.5a = 0.5, b=c=0.5b = c = 0.5, r=0.05r = 0.05 and g=0.25g = 0.25, the legs are 10 and 1, the product is 10 and ρ(K)=10≈3.162\rho(K) = \sqrt{10} \approx 3.162.

Two patches with travel. In the metapopulation epidemic model with two patches of equal size, local transmission rates β1=0.3\beta_1 = 0.3 and β2=0.15\beta_2 = 0.15, recovery rate γ=0.2\gamma = 0.2, and infected individuals moving between the patches at rate m=0.05m = 0.05 each way,

F=(0.3000.15),V=(0.25−0.05−0.050.25),K=(1.250.250.1250.625).F = \begin{pmatrix} 0.3 & 0 \\ 0 & 0.15 \end{pmatrix}, \quad V = \begin{pmatrix} 0.25 & -0.05 \\ -0.05 & 0.25 \end{pmatrix}, \quad K = \begin{pmatrix} 1.25 & 0.25 \\ 0.125 & 0.625 \end{pmatrix}.

With tr⁡K=1.875\operatorname{tr} K = 1.875 and det⁡K=0.75\det K = 0.75, R0=(1.875+0.515625)/2≈1.2965R_0 = (1.875 + \sqrt{0.515625})/2 \approx 1.2965. Travel is in VV: it moves an infected individual, it does not make a new one.

Variations

  • Small domain. If new infections enter only some of the infected classes (only E in SEIR), KK has zero rows, and the nonzero block E⊤KEE^\top K E on the classes that receive new infections has the same spectral radius. Diekmann, Heesterbeek and Roberts (2010) call these the next-generation matrices with small and large domain. In SEIR the small one is the 1×11 \times 1 matrix (R0)(R_0).
  • Direct construction. In models with types such as age groups or risk groups, you can often write KijK_{ij} down directly as the mean number of type ii cases caused by one type jj case, without FF and VV.
  • Continuous types. With age or time since infection as a continuous type, KK becomes an integral operator, and R0R_0 is its spectral radius (Diekmann, Heesterbeek and Metz 1990). A discretization on a grid gives an ordinary matrix.
  • Type reproduction numbers. To ask how much control is needed when only one type can be targeted, such as only the mosquitoes, use a type reproduction number. It has the same threshold at 1, and the critical control effort on that type is 1−1/T1 - 1/T where TT is that number.
  • Control reproduction numbers. Apply the same template to the model with vaccination or treatment in place. The herd immunity threshold is the coverage at which the control reproduction number is 1.

Pitfalls

  • Transfers counted as new infections. In SEIR without births, if you put σE\sigma E into FF instead of VV, you get F=(0βσ0)F = \begin{pmatrix} 0 & \beta \\ \sigma & 0 \end{pmatrix}, V=diag⁡(σ,γ)V = \operatorname{diag}(\sigma, \gamma) and K=(0β/γ10)K = \begin{pmatrix} 0 & \beta/\gamma \\ 1 & 0 \end{pmatrix}, with ρ(K)=β/γ\rho(K) = \sqrt{\beta / \gamma}. This number has the same threshold at 1, but it is not R0R_0: an exposed individual is counted as a new generation. Only infections of susceptibles belong in FF.
  • Power iteration that does not converge. For a vector-borne model, K=(01100)K = \begin{pmatrix} 0 & 1 \\ 10 & 0 \end{pmatrix} has the eigenvalues ±10\pm \sqrt{10}, of equal absolute value. The matrix is irreducible but not primitive (it has period 2), and plain power iteration does not converge. From v=(1,1)v = (1, 1), scaled by the largest entry, the estimates alternate: 10, 1, 10, 1, and so on. Two fixes: iterate with K2K^2, whose dominant eigenvalue 1010 is the product of the legs, and take the square root; or iterate with K+IK + I, which has the same eigenvectors and the dominant eigenvalue 1+101 + \sqrt{10}, and is primitive. Every irreducible non-negative matrix whose directed graph has only cycles of length 2 has this problem, as in a host-vector model without direct transmission between hosts or between vectors.
  • Not at the disease-free state. Evaluating FF at a state with fewer susceptibles gives an effective reproduction number, not R0R_0.
  • The product against the square root. For vector-borne and other two-leg models, the spectral radius and the classical product are both called R0R_0. Their threshold is the same, but derived quantities are not: the fraction of control needed on one leg is 1−1/(product)1 - 1/(\text{product}), not 1−1/ρ(K)1 - 1/\rho(K). Always say which form you use.
  • Units in FF. With frequency-dependent transmission βSI/N\beta S I / N, FF has no factor NN. With density-dependent transmission βSI\beta S I, the entry is βN\beta N, so R0R_0 grows with the population size.
  • Signs in VV. VV must have the transfers into a class as negative off-diagonal entries. If V−1V^{-1} has a negative entry, the split is wrong or a condition fails.

Exercises

  1. SIR with deaths. Infected individuals die at rate μ\mu and recover at rate γ\gamma. Show that R0=β/(γ+μ)R_0 = \beta / (\gamma + \mu). (Answer: one infected class, F=βF = \beta, V=γ+μV = \gamma + \mu.)
  2. Two symmetric groups. Show that K=(2112)K = \begin{pmatrix} 2 & 1 \\ 1 & 2 \end{pmatrix} has R0=3R_0 = 3 with eigenvector (1,1)(1, 1), and that both column sums are 3. (Answer: when all column sums are equal, ρ\rho equals that sum.)
  3. The square of a two-leg matrix. For K=(0pq0)K = \begin{pmatrix} 0 & p \\ q & 0 \end{pmatrix} with p,q>0p, q > 0, show that K2=pqIK^2 = p q I, so ρ(K)=pq\rho(K) = \sqrt{p q}.
  4. Two stages of infection. Infected individuals pass through I1 (rate γ1\gamma_1) and then I2 (rate γ2\gamma_2), with transmission rates β1\beta_1 and β2\beta_2. Show that R0=β1/γ1+β2/γ2R_0 = \beta_1 / \gamma_1 + \beta_2 / \gamma_2. (Answer: FF has the first row (β1,β2)(\beta_1, \beta_2) and zeros below, V=(γ10−γ1γ2)V = \begin{pmatrix} \gamma_1 & 0 \\ -\gamma_1 & \gamma_2 \end{pmatrix}, and K11=β1/γ1+β2/γ2K_{11} = \beta_1/\gamma_1 + \beta_2/\gamma_2.)
  5. The shift. Show that for a non-negative matrix KK and c>0c > 0, ρ(K+cI)=ρ(K)+c\rho(K + c I) = \rho(K) + c, and that K+cIK + c I is primitive when KK is irreducible.

References

  1. O. Diekmann, J. A. P. Heesterbeek and J. A. J. Metz, 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), 1990, pages 365 to 382 (R0 as the dominant eigenvalue of the operator that maps one generation of cases to the next)
  2. P. van den Driessche and James Watmough, Reproduction numbers and sub-threshold endemic equilibria for compartmental models of disease transmission, Mathematical Biosciences 180(1-2), 2002, pages 29 to 48 (the split into F and V, the conditions on the split, R0 = rho(F V^(-1)), Theorem 2 on the stability of the disease-free equilibrium, and the examples, among them a vector-host model)
  3. O. Diekmann, J. A. P. Heesterbeek and M. G. Roberts, The construction of next-generation matrices for compartmental epidemic models, Journal of the Royal Society Interface 7(47), 2010, pages 873 to 885 (a recipe for the matrix, the next-generation matrix with large domain and with small domain, and the link between R0 and the growth rate)
  4. P. van den Driessche, Reproduction numbers of infectious disease models, Infectious Disease Modelling 2(3), 2017, pages 288 to 303 (a review of the method with examples, and the square root in the R0 of vector-host models as a geometric mean of the two legs)

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW2 basic
  • three classic examples