infection_age_process: Infection process for age-structured models

Description Usage Arguments Value

View source: R/prefab.R

Description

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:

λ_{i} = p ∑\limits_{j} C_{i,j} ≤ft( \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^{-λ_{i} Δ t}

.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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.


individual documentation built on Oct. 25, 2021, 9:09 a.m.