The basic SIP (Susceptible-Infected-Prophylaxis) human model model fulfills the generic interface of the human population component. It is a reasonable first complication of the SIS human model. This requires two new parameters, \(\rho\), the probability a new infection is treated, and \(\eta\) the duration of chemoprophylaxis following treatment. \(X\) remains a column vector giving the number of infectious individuals in each strata, and \(P\) the number of treated and protected individuals.
The equations are as follows:
\[ \dot{X} = \mbox{diag}((1-\rho)bEIR)\cdot (H-X-P) - rX \]
\[ \dot{P} = \mbox{diag}(\rho b EIR) \cdot (H-X-P) - \eta P \]
Again, we assume \(H\) and \(X\) to be known. and solve for \(EIR\) and \(P\).
\[ P = \mbox{diag}(1/\eta) \cdot \mbox{diag}(\rho/(1-\rho)) \cdot rX \]
\[ EIR = \mbox{diag}(1/b) \cdot \mbox{diag}(1/(1-\rho)) \cdot \left( \frac{rX}{H-X-P} \right) \]
Given \(EIR\) we can solve for the mosquito population which would have given rise to those equilibrium values.
library(exDE)
library(deSolve)
library(data.table)
library(ggplot2)
Here we run a simple example with 3 population strata at equilibrium.
We use exDE::make_parameters_X_SIP
to set up parameters.
Please note that this only runs the human population component and that
most users should read our fully worked
example to run a full simulation.
<- 3
nStrata <- c(100, 500, 250)
H <- c(20, 120, 80)
X <- 0.55
b <- 0.15
c <- 1/200
r <- c(1/30, 1/40, 1/35)
eta <- c(0.05, 0.1, 0.15)
rho <- matrix(data = 1,nrow = 1, ncol = nStrata)
Psi
<- diag(1/eta) %*% diag(rho/(1-rho)) %*% (r*X)
P <- diag(1/b, nStrata) %*% diag(1/(1-rho)) %*% ((r*X)/(H-X-P))
EIR
<- list(
params nStrata = nStrata
)<- list2env(params)
params
make_parameters_X_SIP(pars = params, b = b, c = c, r = r, rho = rho, eta = eta, Psi = Psi, X0 = X, P0 = as.vector(P), H = H)
make_indices(params)
<- rep(0, 6)
y0 $X_ix] <- X
y0[params$P_ix] <- P
y0[params
<- deSolve::ode(y = y0, times = c(0, 365), func = function(t, y, pars, EIR) {
out list(dXdt(t, y, pars, EIR))
parms = params, method = 'lsoda', EIR = as.vector(EIR))
},
colnames(out)[params$X_ix+1] <- paste0('X_', 1:params$nStrata)
colnames(out)[params$P_ix+1] <- paste0('P_', 1:params$nStrata)
<- as.data.table(out)
out <- melt(out, id.vars = 'time')
out c("Component", "Strata") := tstrsplit(variable, '_', fixed = TRUE)]
out[, := NULL]
out[, variable
ggplot(data = out, mapping = aes(x = time, y = value, color = Strata)) +
geom_line() +
facet_wrap(. ~ Component, scales = 'free') +
theme_bw()