Basic Setup

library(ramp.xds)

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:

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:
sis_mod <- xds_setup(Xname = "SIS")
  • A model for the adult mosquito ecology and infection dynamics, called the MYZ component, is specified by passing an argument to MYZname. For example:
macdonald_mod <- xds_setup(MYZname = "macdonald")
  • A model for the aquatic mosquito ecology, called the L component, is specified by passing an argument to Lname. For example:
aqua_mod <- xds_setup(Lname = "basicL")

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.
sis_mod$frame
[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 default nPatches=1. To specify a different number of patches, an argument is passed to xds_setup():
mod_with_2patches = xds_setup(nPatches=2)
  • 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 habitat membership 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, then membership \(=c(1,2,2)\) and nHabitats\(=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 size HPop is passed as a vector of values and nStrata\(=\mbox{length}(\)HPop\()\). If nPatches\(>1,\) then a residence 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