Every bed net model has six configurable functions, each one dispatched and configured by a different object.
The bednets
model object:
bednets
$distribute_mod
$owner_mod
$user_mod
$effects_mod
$coverage_mod
coverage
-
$ef_sz_mod
[[1]] - for species 1
…
The models get called at two different points:
-
VectorControl
dispatches onclass(model$vector_control) == "dynamic"
-
BedNet
dispatches onclass(model$bednets) == "dynamic"
DistributeBedNets
dispatches onclass(model$bednets$distribute_mod)
is there to model mass distribution of ITNs that should sharply increase bednet ownershipOwnBedNets
dispatches onclass(model$bednets$owner_mod)
is a model that can account for background net replacement and lossUseBedNets
dispatches onclass(model$bednets$user_mod)
is a model for bed net usageBedNetEffects
dispatches onclass(model$bednets$effects_mod)
is a function that modifies search weights
-
-
VectorControlEffectSizes
dispatches onclass(model$bednets) == "dynamic"
BedNetCoverage
dispatches onclass(model$bednets$coverage_mod)
After evaluating
BedNetCoverage
, values are stored atmodel$bednets$coverage
BedNetEffectSizes
dispatches onclass(model$bednets$ef_sz_mod[[s]])
for the \(s^{th}\) species
To set all this up, we call a function with a name that calls a setup function and as set of options to set it up, passed as a list:
setup_bednets = function(...,
distribute_name = 'none', distribute_opts = list(),
own_name = 'none', own_opts = list(),
use_name = 'none', use_opts = list(),
effects_name = 'none', effects_opts = list(),
coverage_name = 'none', coverage_opts = list(),
effect_sizes_name = 'none', effect_sizes_opts = list(),
...
Coverage
In the simplest models, we can simply set coverage
mod <- xds_setup(MYname = "SI")
mod <- setup_vector_control(mod)
mod <- xds_solve(mod)
mod <- setup_bednets(mod,
coverage_name = "func", coverage_opts = cov_opts,
effect_sizes_name = "lemenach")
tt = seq(0:730)
show_bednet_coverage(tt, mod)