Skip to contents

status

Decomposition of State-Dependent Rates

The vast majority of compartmental models contain flows that depend on the states of compartments that are not directly involved in those flows. For example, the magnitude of the flow from compartment A to compartment B could depend on another compartment, C. The most important example of these dependencies is infection, and so we use the terminology from infection processes. However, our model will subsume a very large number of flows as special cases.

Let ss and xx be subsets of the state vector. The length-nn vector ss contains the from-compartments – typically the compartments that are susceptible to infection – for a set of flows. The length-mm vector xx contains compartments – typically the infectious compartments – that affect these flows. The components of xx do not need to affect all components of yy but they do need to affect some of them. Note that we do not keep track of the to-compartments in these flows because they do not matter (I think).

We define the nn-by-mm transmission matrix as the following decomposition.

T=diag(p)Bdiag(c) \DeclareMathOperator{\diag}{diag} T = \diag(p) B \diag(c)

This decomposition involves the following terms.

  • pp – length-nn vector of susceptibilities for each ss state
  • BBnn-by-mm matrix of contacts between each xx and ss state
  • cc – length-mm vector of infectivities for each xx state

An alternative way to write the transmission matrix decomposition – that I prefer because it is a more accurate representation of the actual computations – is using element-wise operations. If \circ is the element-wise product then we have the following.

T=pBc T = p \circ B \circ c^\top

In this expression the column vector pp is element-wise multiplied by each column in BB, and each row in this product is element-wise multiplied by the row vector cc^\top, where \top is the matrix transpose operator.

The vector containing the per-capita flow rates out of each of the ss states is the following.

λ=Tx \lambda = Tx

This λ\lambda vector is often called the force of infection.

And finally the absolute flow rates out of each of the ss states is the following.

r=λs \DeclareMathOperator{\diag}{diag} r = \lambda \circ s

Example – SIR

The ss vector contains a single state, S, and xx contains only I. In this case both nn and mm are 1, and so all components are 1-by-1 as follows.

  • p=1p = 1 – susceptibility
  • B=1B = 1 – contact matrix
  • c=σNc = \frac{\sigma}{N} – infectivity

Therefore we have the following transmission matrix, per-capita flow rate vector, and absolute flow rate vector.

  • T=σNT = \frac{\sigma}{N}
  • λ=σNI\lambda = \frac{\sigma}{N} I
  • r=σNISr = \frac{\sigma}{N} IS

In this overly simple but hopefully clarifying example we could have decided to put σ\sigma and 1N\frac{1}{N} in any of the components, pp, BB, or cc. The point is that we have a somewhat mechanistic and somewhat general decomposition of transmission, so that when we start working with more complex models by combining model modules (e.g. combining SEIR with age and spatial structure) we have a way to conveniently combine these modules so that the resulting transmission rates make mechanistic sense.

Product Models

Now we consider two models, each with the following triples representing the transmission decomposition.

(p1,B1,c1) (p_1, B_1, c_1)

(p2,B2,c2) (p_2, B_2, c_2)

Note that these subscripts represent the model, not the components of these vectors and matrices. The dimensions of the two models is n1,m1n_1, m_1 and n2,m2n_2, m_2.

Taking the product of these two models results in the following triple.

(p,B,c)=(p1p2,B1B2,c1c2) (p, B, c) = (p_1\otimes p_2, B_1\otimes B_2, c_1\otimes c_2)

Where \otimes is the Kronecker product. This leads to an n1n2n_1n_2-by-1 column vector, pp, n1n2n_1n_2-by-m1m2m_1m_2 matrix, BB, and m1m2m_1m_2-by-1 column vector cc.

We also have x1,x2x_1, x_2 and s1,s2s_1, s_2 to combine into xx and ss. Before doing this we need to make a distinction between factor models with transmission and those without. For example, the SIR model clearly has transmission, but a factor model with just age groups does not. Because a pure age model does not distinguish between infectious and susceptible people, the only process that it considers is aging. Nevertheless when the age model becomes combined with a model that does have transmission, we want it to be ready for being combined.

To make an age model – or any other factor model without transmission – ready to be combined with a model that includes transmission we need to do two things. First we need to account for the fact that some or all states may appear in both xx and ss (e.g. young people can be both infectious and susceptible). Second we need to include parameters that are not used in the factor model’s processes but that will be used when it is combined with a model that includes transmission (e.g. an age model needs to have a contact matrix even though contact processes do not affect aging, which is the only process in the age model). The next example illustrates these ideas.

Example – SIR times age

We take the product of the SIR model above with a two-age-group factor model. The components of the transmission decomposition for this particular age-group factor model is as follows.

  • susceptibility: p=[11]p = \begin{bmatrix} 1 \\ 1 \end{bmatrix}
  • contact matrix: B=[q(1q)(1q)q]B = \begin{bmatrix} q & (1 - q) \\ (1 - q) & q \end{bmatrix}
  • infectivity: c=[σyoungσyoung]c = \begin{bmatrix} \sigma_\text{young} \\ \sigma_\text{young} \end{bmatrix}

Here qq is the probability that any given contact is between individuals of the same age. This is a symmetric contact matrix, but we didn’t need to do that. We have also decided to not have susceptibility depend on age, but we absolutely could have by parameterizing that vector.

It is a little odd to refer to this as a decomposition of transmission, because the age-only model contains only aging processes and does not include transmission. However, including the transmission decomposition is necessary to prepare this model for combination with a model with transmission.

Taking the product of this age model with the SIR model above we have the following transmission decomposition.

  • susceptibility: p=[11]p = \begin{bmatrix} 1 \\ 1 \end{bmatrix}
  • contact matrix: B=[q(1q)(1q)q]B = \begin{bmatrix} q & (1 - q) \\ (1 - q) & q \end{bmatrix}
  • infectivity: c=σN[σyoungσold]c = \frac{\sigma}{N}\begin{bmatrix} \sigma_\text{young} \\ \sigma_\text{old} \end{bmatrix}

In this product model xx contains I.young and I.old and ss contains S.young and S.old.

The transmission matrix can be obtained by multiplying the three components of the decomposition as follows.

T=[11][q(1q)(1q)q]σN[σyoungσold]=σN[qσyoung(1q)σold(1q)σyoungqσold] T = \begin{bmatrix} 1 \\ 1 \end{bmatrix} \circ \begin{bmatrix} q & (1 - q) \\ (1 - q) & q \end{bmatrix} \circ \frac{\sigma}{N}\begin{bmatrix} \sigma_\text{young} & \sigma_\text{old} \end{bmatrix} = \frac{\sigma}{N} \begin{bmatrix} q \sigma_\text{young} & (1 - q) \sigma_\text{old} \\ (1 - q) \sigma_\text{young} & q \sigma_\text{old} \end{bmatrix}

The force of infection vector is then the product of TT and x=[IyoungIold]x = \begin{bmatrix}I_{\text{young}} \\ I_{\text{old}}\end{bmatrix}

λ=σN[qσyoungIyoung+(1q)σoldIold(1q)σyoungIyoung+qσoldIold] \lambda = \frac{\sigma}{N} \begin{bmatrix} q \sigma_\text{young} I_{\text{young}} + (1-q) \sigma_\text{old} I_{\text{old}} \\ (1-q) \sigma_\text{young} I_{\text{young}} + q \sigma_\text{old} I_{\text{old}} \end{bmatrix}

Example – SIR with multiple I-boxes times age

This example SIR model has n=1n = 1 susceptible class and m=2m = 2 infectious classes – mild and severe – with the following transmission decomposition.

  • susceptibility: p=1p = 1
  • contact matrix: B=[11]B = \begin{bmatrix} 1 & 1 \end{bmatrix}
  • infectivity: c=1N[σmildσsevere]c = \frac{1}{N}\begin{bmatrix} \sigma_\text{mild} \\ \sigma_\text{severe} \end{bmatrix}

Multiplying this decomposition by the age model above (in that order) gives the following model with n=2n = 2 susceptible compartments and m=4m = 4 infectious compartments.

  • susceptibility: p=[11]p = \begin{bmatrix} 1 \\ 1 \end{bmatrix}
  • contact matrix: B=[q(1q)q(1q)(1q)q(1q)q]B = \begin{bmatrix} q & (1 - q) & q & (1 - q) \\ (1 - q) & q & (1 - q) & q \end{bmatrix}
  • infectivity: c=1N[σmildσyoungσmildσoldσsevereσyoungσsevereσold]c = \frac{1}{N}\begin{bmatrix} \sigma_\text{mild} \sigma_\text{young} \\ \sigma_\text{mild} \sigma_\text{old}\\ \sigma_\text{severe} \sigma_\text{young}\\ \sigma_\text{severe}\sigma_\text{old} \end{bmatrix}

The non-square contact matrix might seem weird, but it is fine because it is modelling contacts between the two susceptible classes with the four infectious classes.

One could write out the 22-by-44 transmission matrix, but I don’t think it would be too informative. What would be more informative would be to write out a component of the force of infection vector, say for young people.

λyoung=1N(qσmildσyoungImild,young+(1q)σmildσoldImild,old+qσsevereσyoungIsevere,young+(1q)σsevereσoldIsevere,old) \begin{array}{rrrrrrr} \lambda_{\text{young}} = \frac{1}{N} & ( & & q \sigma_\text{mild} \sigma_\text{young} I_{\text{mild},\text{young}} \\ & & + & (1-q) \sigma_\text{mild} \sigma_\text{old} I_{\text{mild},\text{old}} \\ & & + & q \sigma_\text{severe} \sigma_\text{young} I_{\text{severe},\text{young}} \\ & & + & (1-q) \sigma_\text{severe} \sigma_\text{old} I_{\text{severe},\text{old}} & ) \\ \end{array}

The first term, for example, gives the contribution to the force of infection due to contacts between young susceptible individuals and mildly infected young individuals.

Example – SIR with multiple I-boxes and partial immunity times age

We are starting to approach ‘real’ models now. This SIR model has an R box that can now flow back into I, because the immunity gained through infection and recovery is imperfect. This model feature means that the ss vector has two states, S and R, and so n=2n = 2. The xx vector contains I_mild and I_severe, and so m=2m = 2 as well. The transmission decomposition looks like this.

  • susceptibility: p=[11π]p = \begin{bmatrix} 1 \\ 1 - \pi \end{bmatrix}
  • contact matrix: B=[1111]B = \begin{bmatrix} 1 & 1 \\ 1 & 1 \end{bmatrix}
  • infectivity: c=1N[σmildσsevere]c = \frac{1}{N}\begin{bmatrix} \sigma_\text{mild} \\ \sigma_\text{severe} \end{bmatrix}

Here π\pi is the efficacy of immunity against reinfection.

The product of this model with age looks like this.

  • susceptibility: p=[111π1π]p = \begin{bmatrix} 1 \\ 1 \\ 1- \pi \\ 1-\pi \end{bmatrix}
  • contact matrix: B=[q(1q)q(1q)(1q)q(1q)qq(1q)q(1q)(1q)q(1q)q]B = \begin{bmatrix} q & (1 - q) & q & (1 - q) \\ (1 - q) & q & (1 - q) & q \\ q & (1 - q) & q & (1 - q) \\ (1 - q) & q & (1 - q) & q \end{bmatrix}
  • infectivity: c=1N[σmildσyoungσmildσoldσsevereσyoungσsevereσold]c = \frac{1}{N}\begin{bmatrix} \sigma_\text{mild} \sigma_\text{young} \\ \sigma_\text{mild} \sigma_\text{old}\\ \sigma_\text{severe} \sigma_\text{young}\\ \sigma_\text{severe}\sigma_\text{old} \end{bmatrix}

The force of infection for young individuals in the R box, for example, is given by the following expression

λR,young=1πN(qσmildσyoungImild,young+(1q)σmildσoldImild,old+qσsevereσyoungIsevere,young+(1q)σsevereσoldIsevere,old) \begin{array}{rrrrrr} \lambda_{\text{R,young}} = \frac{1-\pi}{N} & ( & & q \sigma_\text{mild} \sigma_\text{young} I_{\text{mild},\text{young}} \\ & & + & (1-q) \sigma_\text{mild} \sigma_\text{old} I_{\text{mild},\text{old}} \\ & & + & q \sigma_\text{severe} \sigma_\text{young} I_{\text{severe},\text{young}} \\ & & + & (1-q) \sigma_\text{severe} \sigma_\text{old} I_{\text{severe},\text{old}} & ) \\ \end{array}

Note that this is almost identical to the expression for λyoung\lambda_\text{young} above, but with a factor, 1π1-\pi, giving the reduction in transmission conferred by immunity.

λR,young=(1π)λyoung \lambda_{\text{R,young}} = (1-\pi) \lambda_{\text{young}}

Example

Assume we have an SI model times a young-old model.

Variables.csv

Epi,        Age
S,          young
I,          young
S,          old
I,          old
susceptibility,  
contact

Bookkeeping (in progress)

Index each element of ss with ii and each element of xx with jj.

We can define the per-capita rate at which individuals flow out of the sis_i compartment with the following decomposition.

ri=piλi r_i = p_i \lambda_i

The components of the decomposition are as follows.

  • pip_i: susceptibility (e.g. complement of vaccine efficacy)
  • λi\lambda_i: force of infection

With this definition, the absolute rate of flow out of sis_i is given by risir_i s_i.

The force of infection is.

λi=jBijcjxj \lambda_i = \sum_j B_{ij}c_jx_j