library(ramp.xds)
Basic Setup
Basic Setup includes any option that can be configured with xds_setup
family of functions. Basic setup is used to set up a basic frame:
The dynamical components – model families describing the state spaces for human / vertebrate host infection dynamics and immunity; adult mosquito ecology and infection dynamics; and aquatic ecology.
Basic setup defines one host and one vector species. Additional vector / host species are added in advanced setup
The model structure, including the number of spatial patches, the number of human population strata, the number and location of the aquatic habitats. Two other structural parameters – the number of vector species and the number host species – are set to \(1\).
Dynamic Components
A first step is to choose the modules / model families. There are three COMPONENTS:
- A model for the dynamics of infection and immunity in the human / vertebrate host population, called the X component, is specified by passing an argument to
Xname
. For example:
<- xds_setup(Xname = "SIS") sis_mod
- A model for the adult mosquito ecology and infection dynamics, called the MYZ component, is specified by passing an argument to
MYZname
. For example:
<- xds_setup(MYZname = "macdonald") macdonald_mod
- A model for the aquatic mosquito ecology, called the L component, is specified by passing an argument to
Lname
. For example:
<- xds_setup(Lname = "basicL") aqua_mod
If no names are provided, then xds_setup()
uses the defaults:
Xname = "SIS"
MYZname = "macdonald"
Lname = "trivial"
Modularity & Framing
Each one of the modules can be reduced to a trivial
model. If the MYZ
component is reduced to a trivial component, then either the X component or the L component does not need to set up or computed. To handle special cases, an xds object defines a frame
that dispatches methods to solve the appropriate sets of equations:
xds_setup()
– sets up a full model.
$frame sis_mod
[1] "full"
attr(,"class")
[1] "full"
xds_setup_human()
– sets up a trivial MYZ component that passes the net blood feeding rates of infectious mosquitoes. If there is more than one patch, the model must set up a time spent matrix. These models lack the L component.xds_setup_mosy()
– lacks mosquito infection dynamics. It sets up a model that lacks an X component.xds_setup_aquatic()
– sets up a trivial MYZ component that passes habitat-specific egg laying rates. The model lacks an X component.xds_setup_cohort()
– this model sets up the X component, but it lacks an MYZ component and an L component. Instead, it configures a function \(F_E(a,t, \tau)\) that computes the daily EIR for a cohort of humans born on day \(\tau\) as it ages (\(a\)) over time (\(t\)). For more, see Cohort Dynamics.
All of the following explain the options for xds_setup().
With some minor exceptions for xds_setup_cohort(),
all setup functions follow the same conventions.
Structural Parameters
Every model has three basic structural parameters:
nPatches
or \(n_p\) is the number of spatial patches. By defaultnPatches=1
. To specify a different number of patches, an argument is passed toxds_setup()
:
= xds_setup(nPatches=2) mod_with_2patches
nHabitats
or \(n_q\) is the number of aquatic habitats. The parameter can not (and should not) be set from the command line. Instead, the habitatmembership
vector is passed that gives the index of the patch where habitat is found. If the first patch has 1 habitat, and the next patch has 2, thenmembership
\(=c(1,2,2)\) andnHabitats
\(=3\):
xds_setup(nPatches=2, membership = c(1,2,2))$nHabitats
[1] 3
nStrata
or \(n_h\) is the number of human population strata. The number can not (and should not) be set from the command line. Instead, the human population sizeHPop
is passed as a vector of values andnStrata
\(=\mbox{length}(\)HPop
\()\). IfnPatches
\(>1,\) then aresidence
vector must be passed that gives the index of the patch where each population stratum resides, and it must be true that \(\mbox{length}(\)residence
\()=\)nStrata
.
If nPatches
is set to a value larger than one, then the user should also pass arguments to set up mosquito dispersal, and human time spent/time at risk. To configure these elements using xds_setup()
, see Spatial Dynamics.
Blood Feeding
The search weights for human population strata used in the blood feeding intervace can be set in xds_setup()
by setting the values of searchB
where \(\mbox{length}(\)searchB
\()=\)nStrata
.
Egg Laying
The search weights for human population strata used in the blood feeding interface can be set in xds_setup()
by setting the values of searchQ
where \(\mbox{length}(\)searchQ
\()=\)nHabitats
.
Trace Functions
When any one of the modules is trivial
, the outputs of that model are passed from a function, called a trace function. Configuration is described in Trace Functions