Calculate vectorial capacity reduction for a list of interventions
Source:R/model_impact.R
calculate_impact.RdFor each intervention object in interventions_vec,
evaluates the entomological model on every day of the intervention and
returns the average vectorial capacity and impact (reduction in
vectorial capacity) at each coverage. This is
run_interventions applied to the parameters stored in each
intervention ($param_set), so both functions give the same results
and the same output format.
The model parameters are those of model_p (the model_p used
to build the interventions does not matter).
Arguments
- interventions_vec
Intervention objects created with
build_intervention(), combined withc()(e.g.c(itn1, itn2)); a singlebuild_intervention()output works as is.- coverage_vec
Numeric vector of deployment coverages (values in
[0, 1]). The impact is always computed relative to coverage 0 (no intervention), which is evaluated internally when not supplied.- model_p
Model object created with
build_model_obj().- exposure
Proportion of human exposure to bites that occurs where the intervention protects, in
[0, 1](default 1). The intervention acts on an effective coveragecoverage_vec * exposure. Typicallycalculate_exposure(...)$Exposure_Indoor_whileinbedfor ITNs, and$indoor_restingor$Exposure_Indoor_totalfor IRS (seecalculate_exposure). Reported coverages remain the deployment coverages.- keep_time
Logical (default
FALSE): also return the vectorial capacity and impact on each day.
Value
A data.table with one row per intervention and coverage:
intervention (position in interventions_vec), name,
the intervention parameters (as in run_interventions()),
coverage, exposure, avg_vc and avg_impact.
With keep_time = TRUE, a list with this table as impact and a
long table time with intervention, name,
coverage, day (0 = deployment), vc and impact.
Plot it with plot_impact.