Age of Infection (AoI)

A Probabilistic Synthesis of Malaria Epidemiology

library(ramp.falciparum)
library(deSolve)
library(knitr)

The Random Variables Approach

Let \(z(\alpha, a)\) denote the density of parasite cohorts of age \(\alpha\) in a host cohort of age \(a\). We assume infections clear at the constant rate \(r\). Since infections in \(M/M/\infty\) are independent, we can track the dynamics for the AoI of all parasite cohorts with the equation,

\[\begin{equation} \frac{\partial z}{\partial a} + \frac{\partial z}{\partial \alpha} = - rz, \end{equation}\]

with the boundary condition \(z_\tau(a,0)=h_\tau(a).\) We note that the age of the host birth cohort sets an upper limit for the parasite cohort, so \(0 < \alpha < a\). The solution, which describes density of infections of age \(\alpha\) in a host cohort of age \(a\), is given by the formula:

\[\begin{equation} z_\tau(\alpha, a | h) = h_\tau \left(a-\alpha\right) e^{-r \alpha}. \label{zda} \end{equation}\]

From these equations, we derive random variables describing the MoI, the AoI, and the AoY, noting that the mean MoI is:

\[\begin{equation} m_\tau(a | h) = \int_0^a z_\tau(\alpha, a |h) d \alpha \end{equation}\]

In ramp.falciparum, this is computed with the function meanMoI

moi = meanMoI(aa, foiP3, hhat=5/365)
plot(aa, moi, type = "l", ylab = expression(m[tau](a)), xlab = "a - cohort age (in days)")

The three give the same answers, up to slight differences introduced by the numerical methods:

c(mean(abs(moi - hybrid$m)) < 1e-9,
mean(abs(MMinf$m- hybrid$m)) < 1e-10,
max(abs(moi - hybrid$m)) < 1e-8,
max(abs(MMinf$m- hybrid$m))< 1e-10)