Age of Infection (AoI)

A Probabilistic Synthesis of Malaria Epidemiology

library(ramp.falciparum)
library(deSolve)
library(knitr)
Warning: package 'knitr' was built under R version 4.3.3

The Random Variables Approach

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

za+zα=rz,

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

zτ(α,a|h)=hτ(aα)erα.

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

mτ(a|h)=0azτ(α,a|h)dα

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)