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
)
a CategoricalVariable
object.
a string representing the susceptible state (usually "S").
a string representing the state new infections go to (usually "E" or "I").
a string representing the infected and infectious state (usually "I").
a IntegerVariable
giving the age of each individual.
the total number of age bins (groups).
the probability of infection given a contact.
the size of the time step (in units relative to the contact rates in mixing
).
a mixing (contact) matrix between age groups.
a function which can be passed as a process to simulation_loop
.