SIS-xde (Susceptible-Infected-Susceptible) Human Model
Source:vignettes/human_sis.Rmd
human_sis.Rmd
The SIS (Susceptible-Infected-Susceptible) human xde model model fulfills the generic interface of the human population component. It is the simplest model of endemic diseases in humans.
We subdivide a population into susceptible () and infected and infectious () individuals, where the total population is We assume the force of infection (, FoI) is linearly proportional to the EIR: In its general form, with births () and deaths (at the per-capita rate ), the generalized SIS_xde dynamics are:
If there is no demographic change, the SIS-xde model can be rewritten as a single equation:
Even in this simplified form, we are
assuming that a population could be stratified, such that the variables
and parameter are all vectors with length nStrata.
Equilibrium Solutions
A typical situation when using this model is that (total population size by strata) and (number of infectious persons by strata) are known from census and survey data. Then it is of interest to find the value of (Entomological Inoculation Rate) which leads to that prevalence at equilibrium.
Example
Here we run a simple example with 3 population strata at equilibrium.
We use ramp.xds::make_parameters_X_SIS_xde
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.
We use the null (constant) model of human demography ( constant for all time).
The Long Way
To set up systems of differential equations, we must set the values of all our parameters.
nStrata <- 3
H <- c(100, 500, 250)
residence <- rep(1,3)
nPatches=1
nHabitats=1
membership=1
params <- make_xds_template("ode", "cohort", nPatches, membership, residence)
b <- rep(0.55, nStrata)
c <- rep(0.15, nStrata)
r <- rep(1/200, nStrata)
Xo = list(b=b, c=c, r=r)
class(Xo) <- "SIS"
foi = c(1:3)/365
eir <- foi/b
xde_steady_state_X(foi, H, Xo)-> ss
ss
#> $S
#> [1] 64.60177 238.56209 94.55959
#>
#> $I
#> [1] 35.39823 261.43791 155.44041
MYZo = list(MYZm = eir*H)
Xo$S=ss$S
Xo$I=ss$I
params <- setup_Xpar("SIS", params, 1, Xo)
params <- setup_Xinits(params, H, 1, Xo)
params <- setup_Hpar_static(params, 1)
params <- setup_MYZpar("trivial", params, 1)
params <- setup_Lpar("trivial", params, 1)
params <- setup_Linits(params, 1)
params <- make_indices(params)
F_season = function(t){0*t+1}
F_trend = function(t){0*t+1}
F_age = function(a){0*a+1}
params$EIRpar = list()
params$EIRpar$eir <- as.vector(eir)
params$EIRpar$F_season <- F_season
params$EIRpar$F_trend <- F_trend
params$EIRpar$F_age <- F_age
params <- set_eir(eir, params)
params = make_indices(params)
Xo$S=H
Xo$I=H*0
params = setup_Xinits(params, H, 1, Xopts = Xo)
y0 <- get_inits(params)
y0$X
#> $H
#> [1] 100 500 250
#>
#> $I
#> [1] 0 0 0
params <-xds_solve_cohort(params)
out1 <- params$outputs$orbits
Using Setup
We have developed utilities for setting up models. We pass the parameter values and initial values as lists:
xds_setup_cohort(eir, Xname="SIS", HPop=H, Xopts = Xo) -> test_SIS_xde
xds_solve_cohort(test_SIS_xde)-> test_SIS_xde
test_SIS_xde$outputs$orbits$XH[[1]] -> XH2
sum((XH$true_pr-XH2$true_pr)^2)
#> [1] 0