Simulates infection for age-structured models, where individuals contact each other at a rate given by some mixing (contact) matrix. The force of infection on susceptibles in a given age class is computed as: $$\lambda_{i} = p \sum\limits_{j} C_{i,j} \left( \frac{I_{j}}{N_{j}} \right) $$ Where \(C\) is the matrix of contact rates, \(p\) is the probability of infection per contact. The per-capita probability of infection for susceptible individuals is then: $$1 - e^{-\lambda_{i} \Delta t}$$.

infection_age_process(
  state,
  susceptible,
  exposed,
  infectious,
  age,
  age_bins,
  p,
  dt,
  mixing
)

Arguments

state

a CategoricalVariable object.

susceptible

a string representing the susceptible state (usually "S").

exposed

a string representing the state new infections go to (usually "E" or "I").

infectious

a string representing the infected and infectious state (usually "I").

age

a IntegerVariable giving the age of each individual.

age_bins

the total number of age bins (groups).

p

the probability of infection given a contact.

dt

the size of the time step (in units relative to the contact rates in mixing).

mixing

a mixing (contact) matrix between age groups.

Value

a function which can be passed as a process to simulation_loop.