Title: | An individual based model for malaria |
---|---|
Description: | Specifies the latest and greatest malaria model. |
Authors: | Giovanni Charles [aut, cre], Peter Winskill [aut], Hillary Topazian [aut], Joseph Challenger [aut], Richard Fitzjohn [aut], Richard Sheppard [aut], Tom Brewer [aut], Kelly McCain [aut], Lydia Haile [aut], Imperial College of Science, Technology and Medicine [cph] |
Maintainer: | Giovanni Charles <[email protected]> |
License: | MIT + file LICENSE |
Version: | 2.0.0 |
Built: | 2024-11-02 05:54:29 UTC |
Source: | https://github.com/mrc-ide/malariasimulation |
From SI of Commun. 5:5606 doi: 10.1038/ncomms6606 (2014)
AL_params
AL_params
An object of class numeric
of length 4.
Use a vector of preset parameters for the AL drug (artemether-lumefantrine)
Default parameters, from L to R, are: drug_efficacy: 0.95, drug_rel_c: 0.05094, drug_prophylaxis_shape: 11.3, drug_prophylaxis_scale: 10.6
Preset parameters for the An. arabiensis vector
arab_params
arab_params
An object of class list
of length 7.
Default parameters: species: "arab" blood_meal_rates: 0.3333333 foraging_time: .69 Q0: 0.71 phi_bednets: 0.8 phi_indoors: 0.86 mum: 0.132
parameters from: https://www.pnas.org/content/pnas/early/2019/07/02/1820646116.full.pdf
taken from "Modelling the impact of vector control interventions on Anopheles gambiae population dynamics"
calculate_carrying_capacity(parameters, m, species)
calculate_carrying_capacity(parameters, m, species)
parameters |
model parameters |
m |
number of adult mosquitoes |
species |
index of the species to calculate for |
Class: Correlation parameters
Class: Correlation parameters
This class implements functionality that allows interventions to be correlated, positively or negatively. By default, interventions are applied independently and an individual's probability of receiving two interventions (either two separate interventions or two rounds of the same one) is the product of the probability of receiving each one.
By setting a positive correlation between two interventions, we can make it so that the individuals that receive intervention A are more likely to receive intervention B. Conversely, a negative correlation will make it such that individuals that receive intervention A are less likely to also receive intervention B.
Broadly speaking, the implementation works by assigning at startup a weight to each individual and intervention pair, reflecting how likely an individual is to receive that intervention. Those weights are derived stochastically from the configured correlation parameters.
For a detailed breakdown of the calculations, see Protocol S2 of Griffin et al. (2010). Derive the mvnorm from the configured correlations.
If a restored_mvnorm
is specified, its columns (corresponding to
restored interventions) will be re-used as is. Missing columns (for new
interventions) are derived in accordance with the restored data.
new()
initialise correlation parameters
CorrelationParameters$new(population, interventions)
population
popularion size
interventions
character vector with the name of enabled interventions
inter_round_rho()
Add rho between rounds
CorrelationParameters$inter_round_rho(int, rho)
int
string representing the intervention to update
rho
value between 0 and 1 representing the correlation between rounds of the intervention
inter_intervention_rho()
Add rho between interventions
CorrelationParameters$inter_intervention_rho(int_1, int_2, rho)
int_1
string representing the first intervention
int_2
string representing the second intervention (intechangable with int_1)
rho
value between -1 and 1 representing the correlation between rounds of the intervention
sigma()
Standard deviation of each intervention between rounds
CorrelationParameters$sigma()
mvnorm()
multivariate norm draws for these parameters
CorrelationParameters$mvnorm()
save_state()
Save the correlation state.
CorrelationParameters$save_state()
restore_state()
Restore the correlation state.
Only the randomly drawn weights are restored. The object needs to be initialized with the same rhos.
CorrelationParameters$restore_state(timestep, state)
timestep
the timestep at which simulation is resumed. This parameter's value is ignored, it only exists to conform to a uniform interface.
state
a previously saved correlation state, as returned by the save_state method.
clone()
The objects of this class are cloneable with this method.
CorrelationParameters$clone(deep = FALSE)
deep
Whether to make a deep clone.
creates a data structure for holding pre-erythrocytic vaccine profile parameters. Parameters are validated on creation.
create_pev_profile(vmax, alpha, beta, cs, rho, ds, dl)
create_pev_profile(vmax, alpha, beta, cs, rho, ds, dl)
vmax |
maximum efficacy of the vaccine |
alpha |
shape parameter for the vaccine efficacy model |
beta |
scale parameter for the vaccine efficacy model |
cs |
peak parameters for the antibody model (vector of mean and std. dev) |
rho |
delay parameters for the antibody model (vector of mean and std. dev) |
ds |
delay parameters for the antibody model, short-term waning (vector of mean and std. dev) |
dl |
delay parameters for the antibody model, long-term waning (vector of mean and std. dev) |
Create progress process
create_progress_process(timesteps)
create_progress_process(timesteps)
timesteps |
Simulation timesteps |
Progress bar process function
From SI of Commun. 5:5606 doi: 10.1038/ncomms6606 (2014)
DHA_PQP_params
DHA_PQP_params
An object of class numeric
of length 4.
Use a vector of preset parameters for the DHA-PQP drug (dihydroartemisinin-piperaquine)
Default parameters, from L to R, are: drug_efficacy: 0.95, drug_rel_c: 0.09434, drug_prophylaxis_shape: 4.4, drug_prophylaxis_scale: 28.1
Calculate the birthrate for a population in equilibrium
find_birthrates(pops, age_high, deathrates)
find_birthrates(pops, age_high, deathrates)
pops |
a vector of populations |
age_high |
a vector of age groups |
deathrates |
vector of deathrates for each age group |
Preset parameters for the An. funestus vector
fun_params
fun_params
An object of class list
of length 7.
Default parameters: species: "fun" blood_meal_rates: 0.3333333 foraging_time: .69 Q0: 0.94 phi_bednets: 0.78 phi_indoors: 0.87 mum: 0.112
parameters from: https://www.pnas.org/content/pnas/early/2019/07/02/1820646116.full.pdf
Preset parameters for the An. gambiae s.s vector
gamb_params
gamb_params
An object of class list
of length 7.
Default parameters: species: "gamb" blood_meal_rates: 0.3333333 foraging_time: .69 Q0: 0.92 phi_bednets: 0.85 phi_indoors: 0.90 mum: 0.132
parameters from: https://www.pnas.org/content/pnas/early/2019/07/02/1820646116.full.pdf
Retrieve the resistance parameters associated with the drug each individual receiving clinical treatment has been administered in the current time step.
get_antimalarial_resistance_parameters(parameters, drugs, timestep)
get_antimalarial_resistance_parameters(parameters, drugs, timestep)
parameters |
the model parameters |
drugs |
vector of integers representing the drugs administered to each individual receiving treatment |
timestep |
the current time step |
returns a CorrelationParameters
object for you edit. By
default, all correlations are set to 0
get_correlation_parameters(parameters)
get_correlation_parameters(parameters)
parameters |
model parameters |
# get the default model parameters parameters <- get_parameters() # Set some vaccination strategy parameters <- set_mass_pev( parameters, profile = rtss_profile, timesteps = 100, coverages = .9, min_wait = 0, min_ages = 100, max_ages = 1000, booster_spacing = numeric(0), booster_coverage = numeric(0), booster_profile = NULL ) # Set some smc strategy parameters <- set_drugs(parameters, list(SP_AQ_params)) parameters <- set_smc( parameters, drug = 1, timesteps = 100, coverages = .9, min_age = 100, max_age = 1000 ) # Correlate the vaccination and smc targets correlations <- get_correlation_parameters(parameters) correlations$inter_intervention_rho('pev', 'smc', 1) # Correlate the rounds of smc correlations$inter_round_rho('smc', 1) # You can now pass the correlation parameters to the run_simulation function
# get the default model parameters parameters <- get_parameters() # Set some vaccination strategy parameters <- set_mass_pev( parameters, profile = rtss_profile, timesteps = 100, coverages = .9, min_wait = 0, min_ages = 100, max_ages = 1000, booster_spacing = numeric(0), booster_coverage = numeric(0), booster_profile = NULL ) # Set some smc strategy parameters <- set_drugs(parameters, list(SP_AQ_params)) parameters <- set_smc( parameters, drug = 1, timesteps = 100, coverages = .9, min_age = 100, max_age = 1000 ) # Correlate the vaccination and smc targets correlations <- get_correlation_parameters(parameters) correlations$inter_intervention_rho('pev', 'smc', 1) # Correlate the rounds of smc correlations$inter_round_rho('smc', 1) # You can now pass the correlation parameters to the run_simulation function
Get initialised carrying capacity for each species
get_init_carrying_capacity(parameters)
get_init_carrying_capacity(parameters)
parameters |
the model parameters |
a vector of carrying initialised carrying capacity estimates for each vector species
get_parameters creates a named list of parameters for use in the model. These parameters are passed to process functions. These parameters are explained in "The US President's Malaria Initiative, Plasmodium falciparum transmission and mortality: A modelling study."
get_parameters(overrides = list())
get_parameters(overrides = list())
overrides |
a named list of parameter values to use instead of defaults The parameters are defined below. initial state proportions:
human fixed state transitions:
human demography parameters:
initial immunity values:
immunity decay rates:
immunity boost grace periods:
maternal immunity parameters:
unique biting rate:
probability of pre-erythrocytic infection:
probability of detection by light-microscopy when asymptomatic:
probability of clinical infection:
probability of severe infection:
infectivity towards mosquitoes:
mosquito fixed state transitions (including mortality):
vector biology:
species specific values are vectors
please set species parameters using the convenience function
seasonality and carrying capacity parameters:
please set flexible carrying capacity using the convenience function
parasite incubation periods:
treatment parameters:
please set treatment parameters with the convenience functions
MDA, SMC and PMC parameters:
please set these parameters with the convenience functions
bednet, irs and mosquito feeding cycle parameters:
please set vector control strategies using
PEV parameters:
please set vaccine strategies with the convenience functions
TBV parameters:
please set TBV parameters with the convenience functions in
Antimalarial resistance parameters:
please set antimalarial resistance parameters with the convenience functions in
rendering: All values are in timesteps and all ranges are inclusive. Please set rendered age groups using the convenience function
mixing:
miscellaneous:
|
1000 draws from the joint posterior fit from
parameter_draws
parameter_draws
parameter_draws
A list of lists of length 1000, each level contains a list of drawn parameters
https://www.nature.com/articles/ncomms4136
NOTE: the inital EIR is likely to change unless the rest of the model is in equilibrium. NOTE: please set seasonality first, since the mosquito_limit will estimate an upper bound from the peak season.
max_total_M is calculated using the equilibrium solution from "Modelling the impact of vector control interventions on Anopheles gambiae population dynamics"
parameterise_mosquito_equilibrium(parameters, EIR)
parameterise_mosquito_equilibrium(parameters, EIR)
parameters |
the parameters to modify |
EIR |
to work from |
Sets total_M and an upper bound for the number of mosquitoes in the simulation. NOTE: please set seasonality first, since the mosquito_limit will estimate an upper bound from the peak season.
parameterise_total_M(parameters, total_M)
parameterise_total_M(parameters, total_M)
parameters |
the parameters to modify |
total_M |
the initial adult mosquitoes in the simulation |
Calculate the yearly offset (in timesteps) for the peak mosquito season
peak_season_offset(parameters)
peak_season_offset(parameters)
parameters |
to work from |
Parameters for a booster dose of R21 for use with the set_mass_pev and set_pev_epi functions (Schmit + Topazian et al. 2022 Lancet ID)
r21_booster_profile
r21_booster_profile
An object of class list
of length 7.
Parameters for a primary dose of R21 for use with the set_mass_pev and set_pev_epi functions (Schmit + Topazian et al. 2022 Lancet ID)
r21_profile
r21_profile
An object of class list
of length 7.
Parameters for a booster dose of RTS,S for use with the set_mass_pev and set_pev_epi functions (White MT et al. 2015 Lancet ID)
rtss_booster_profile
rtss_booster_profile
An object of class list
of length 7.
Parameters for a primary dose of RTS,S for use with the set_mass_pev and set_pev_epi functions (White MT et al. 2015 Lancet ID)
rtss_profile
rtss_profile
An object of class list
of length 7.
Run a metapopulation model
run_metapop_simulation( timesteps, parameters, correlations = NULL, mixing_tt, export_mixing, import_mixing, p_captured_tt, p_captured, p_success )
run_metapop_simulation( timesteps, parameters, correlations = NULL, mixing_tt, export_mixing, import_mixing, p_captured_tt, p_captured, p_success )
timesteps |
the number of timesteps to run the simulation for (in days) |
parameters |
a list of model parameter lists for each population |
correlations |
a list of correlation parameters for each population (default: NULL) |
mixing_tt |
a vector of time steps for each mixing matrix |
export_mixing |
a list of matrices of coefficients for exportation of infectivity. Rows = origin sites, columns = destinations. Each matrix element describes the mixing pattern from destination to origin. Each matrix element must be between 0 and 1. Each matrix is activated at the corresponding timestep in mixing_tt |
import_mixing |
a list of matrices of coefficients for importation of infectivity. |
p_captured_tt |
a vector of time steps for each p_captured matrix |
p_captured |
a list of matrices representing the probability that
travel between sites is intervened by a test and treat border check.
Dimensions are the same as for |
p_success |
the probability that an individual who has tested positive (through an RDT) successfully clears their infection through treatment |
a list of dataframe of model outputs as in run_simulation
this function accepts an initial simulation state as an argument, and returns the final state after running all of its timesteps. This allows one run to be resumed, possibly having changed some of the parameters.
run_resumable_simulation( timesteps, parameters = NULL, correlations = NULL, initial_state = NULL, restore_random_state = FALSE )
run_resumable_simulation( timesteps, parameters = NULL, correlations = NULL, initial_state = NULL, restore_random_state = FALSE )
timesteps |
the timestep at which to stop the simulation |
parameters |
a named list of parameters to use |
correlations |
correlation parameters |
initial_state |
the state from which the simulation is resumed |
restore_random_state |
if TRUE, restore the random number generator's state from the checkpoint. |
a list with two entries, one for the dataframe of results and one for the final simulation state.
Run the simulation for some time given some parameters. This currently returns a dataframe with the number of individuals in each state at each timestep.
The resulting dataframe contains the following columns:
timestep: the timestep for the row
infectivity: the infectivity from humans towards mosquitoes
FOIM: the force of infection towards mosquitoes (per species)
mu: the death rate of adult mosquitoes (per species)
EIR: the Entomological Inoculation Rate (per timestep, per species, over the whole population)
n_bitten: number of humans bitten by an infectious mosquito
n_treated: number of humans treated for clinical or severe malaria this timestep
n_infections: number of humans who get an asymptomatic, clinical or severe malaria this timestep
natural_deaths: number of humans who die from aging
S_count: number of humans who are Susceptible
A_count: number of humans who are Asymptomatic
D_count: number of humans who have the clinical malaria
U_count: number of subpatent infections in humans
Tr_count: number of detectable infections being treated in humans
ica_mean: the mean acquired immunity to clinical infection over the population of humans
icm_mean: the mean maternal immunity to clinical infection over the population of humans
ib_mean: the mean blood immunity to all infection over the population of humans
id_mean: the mean immunity from detection through microscopy over the population of humans
n: number of humans between an inclusive age range at this timestep. This defaults to n_730_3650. Other age ranges can be set with prevalence_rendering_min_ages and prevalence_rendering_max_ages parameters.
n_detect_lm (or pcr): number of humans with an infection detectable by microscopy (or pcr) between an inclusive age range at this timestep. This defaults to n_detect_730_3650. Other age ranges can be set with prevalence_rendering_min_ages and prevalence_rendering_max_ages parameters.
p_detect_lm (or pcr): the sum of probabilities of detection by microscopy (or pcr) between an inclusive age range at this timestep. This defaults to p_detect_730_3650. Other age ranges can be set with prevalence_rendering_min_ages and prevalence_rendering_max_ages parameters.
n_inc: number of new infections for humans between an inclusive age range at this timestep. incidence columns can be set with incidence_rendering_min_ages and incidence_rendering_max_ages parameters.
p_inc: sum of probabilities of infection for humans between an inclusive age range at this timestep. incidence columns can be set with incidence_rendering_min_ages and incidence_rendering_max_ages parameters.
n_inc_clinical: number of new clinical infections for humans between an inclusive age range at this timestep. clinical incidence columns can be set with clinical_incidence_rendering_min_ages and clinical_incidence_rendering_max_ages parameters.
p_inc_clinical: sub of probabilities of clinical infection for humans between an inclusive age range at this timestep. clinical incidence columns can be set with clinical_incidence_rendering_min_ages and clinical_incidence_rendering_max_ages parameters.
n_inc_severe: number of new severe infections for humans between an inclusive age range at this timestep. severe incidence columns can be set with severe_incidence_rendering_min_ages and severe_incidence_rendering_max_ages parameters.
p_inc_severe: the sum of probabilities of severe infection for humans between an inclusive age range at this timestep. severe incidence columns can be set with severe_incidence_rendering_min_ages and severe_incidence_rendering_max_ages parameters.
E_count: number of mosquitoes in the early larval stage (per species)
L_count: number of mosquitoes in the late larval stage (per species)
P_count: number of mosquitoes in the pupal stage (per species)
Sm_count: number of adult female mosquitoes who are Susceptible (per species)
Pm_count: number of adult female mosquitoes who are incubating (per species)
Im_count: number of adult female mosquitoes who are infectious (per species)
rate_D_A: rate that humans transition from clinical disease to asymptomatic
rate_A_U: rate that humans transition from asymptomatic to subpatent
rate_U_S: rate that humans transition from subpatent to susceptible
net_usage: the number people protected by a bed net
mosquito_deaths: number of adult female mosquitoes who die this timestep
n_drug_efficacy_failures: number of clinically treated individuals whose treatment failed due to drug efficacy
n_early_treatment_failure: number of clinically treated individuals who experienced early treatment failure
n_successfully_treated: number of clinically treated individuals who are treated successfully (includes individuals who experience slow parasite clearance)
n_slow_parasite_clearance: number of clinically treated individuals who experienced slow parasite clearance
run_simulation(timesteps, parameters = NULL, correlations = NULL)
run_simulation(timesteps, parameters = NULL, correlations = NULL)
timesteps |
the number of timesteps to run the simulation for (in days) |
parameters |
a named list of parameters to use |
correlations |
correlation parameters |
dataframe of results
Run the simulation with repetitions
run_simulation_with_repetitions( timesteps, repetitions, overrides = list(), parallel = FALSE )
run_simulation_with_repetitions( timesteps, repetitions, overrides = list(), parallel = FALSE )
timesteps |
the number of timesteps to run the simulation for |
repetitions |
n times to run the simulation |
overrides |
a named list of parameters to use instead of defaults |
parallel |
execute runs in parallel |
Parameterise antimalarial resistance
set_antimalarial_resistance( parameters, drug, timesteps, artemisinin_resistance_proportion, partner_drug_resistance_proportion, slow_parasite_clearance_probability, early_treatment_failure_probability, late_clinical_failure_probability, late_parasitological_failure_probability, reinfection_during_prophylaxis_probability, slow_parasite_clearance_time )
set_antimalarial_resistance( parameters, drug, timesteps, artemisinin_resistance_proportion, partner_drug_resistance_proportion, slow_parasite_clearance_probability, early_treatment_failure_probability, late_clinical_failure_probability, late_parasitological_failure_probability, reinfection_during_prophylaxis_probability, slow_parasite_clearance_time )
parameters |
the model parameters |
drug |
the index of the drug which resistance is being set, as set by the set_drugs() function, in the parameter list |
timesteps |
vector of time steps for each update to resistance proportion and resistance outcome probability |
artemisinin_resistance_proportion |
vector of updates to the proportions of infections that are artemisinin resistant at time t |
partner_drug_resistance_proportion |
vector of updates to the proportions of infections that are partner-drug resistant at time t |
slow_parasite_clearance_probability |
vector of updates to the proportion of artemisinin-resistant infections that result in early treatment failure |
early_treatment_failure_probability |
vector of updates to the proportion of artemisinin-resistant infections that result in slow parasite clearance |
late_clinical_failure_probability |
vector of updates to the proportion of partner-drug-resistant infections that result in late clinical failure |
late_parasitological_failure_probability |
vector of updates to the proportion of partner-drug-resistant infections that result in late parasitological failure |
reinfection_during_prophylaxis_probability |
vector of updates to the proportion of partner-drug-resistant infections that result in reinfection during prophylaxis |
slow_parasite_clearance_time |
single value representing the mean time individual's experiencing slow parasite clearance reside in the treated state |
The model will distribute bed nets at timesteps
to a random
sample of the entire human population. The sample size will be a proportion
of the human population taken from the corresponding coverages
.
The sample can contain humans who already have bed nets.
All of the sample "use" their bed nets on the timestep after they are distributed. Incomplete usage is not part of this model.
If a human in the sample already has a bed net, their bed net will be replaced by a new one.
Bed nets will be randomly removed each timestep with a rate of 1 - exp(-1/retention)
The structure for the bed net model is documented in the S.I. of 10.1038/s41467-018-07357-w
set_bednets(parameters, timesteps, coverages, retention, dn0, rn, rnm, gamman)
set_bednets(parameters, timesteps, coverages, retention, dn0, rn, rnm, gamman)
parameters |
a list of parameters to modify |
timesteps |
the timesteps at which to distribute bed nets |
coverages |
the proportion of the human population who receive bed nets |
retention |
the average number of timesteps a net is kept for |
dn0 |
a matrix of death probabilities for each species over time. With nrows=length(timesteps), ncols=length(species) |
rn |
a matrix of repelling probabilities for each species over time With nrows=length(timesteps), ncols=length(species) |
rnm |
a matrix of minimum repelling probabilities for each species over time With nrows=length(timesteps), ncols=length(species) |
gamman |
a vector of bednet half-lives for each distribution timestep |
Allows the user to set a completely flexible and custom carrying capacity for each species
set_carrying_capacity(parameters, timesteps, carrying_capacity_scalers)
set_carrying_capacity(parameters, timesteps, carrying_capacity_scalers)
parameters |
the model parameters |
timesteps |
vector of timesteps for each rescale change |
carrying_capacity_scalers |
matrix of scaling factors to scale the baseline carrying capacity for each species with nrows = length(timesteps), ncols = length(species) |
Parameterise clinical treatment
set_clinical_treatment(parameters, drug, timesteps, coverages)
set_clinical_treatment(parameters, drug, timesteps, coverages)
parameters |
the model parameters |
drug |
the index of the drug to set as a treatment |
timesteps |
vector of timesteps for each coverage change |
coverages |
vector of coverages for this drug |
Parameterise variable deathrates
set_demography(parameters, agegroups, timesteps, deathrates)
set_demography(parameters, agegroups, timesteps, deathrates)
parameters |
the model parameters |
agegroups |
vector of agegroups (in timesteps) |
timesteps |
vector of timesteps for each change in demography |
deathrates |
matrix of deathrates per age group per timestep.
Rows are timesteps from the |
Parameterise drugs to use in the model
set_drugs(parameters, drugs)
set_drugs(parameters, drugs)
parameters |
the model parameters |
drugs |
a list of drug parameters, can be set using presets |
Parameterise age grouped output rendering
set_epi_outputs( parameters, age_group = NULL, incidence = NULL, clinical_incidence = NULL, severe_incidence = NULL, prevalence = NULL, ica = NULL, icm = NULL, iva = NULL, ivm = NULL, id = NULL, ib = NULL )
set_epi_outputs( parameters, age_group = NULL, incidence = NULL, clinical_incidence = NULL, severe_incidence = NULL, prevalence = NULL, ica = NULL, icm = NULL, iva = NULL, ivm = NULL, id = NULL, ib = NULL )
parameters |
the model parameters |
age_group |
age breaks for population size outputs; default = NULL |
incidence |
age breaks for incidence outputs (D+Tr+A); default = NULL |
clinical_incidence |
age breaks for clinical incidence outputs (symptomatic); default = c(0, 1825) |
severe_incidence |
age breaks for severe incidence outputs; default = NULL |
prevalence |
age breaks for clinical prevalence outputs (pcr and lm detectable infections); default = c(730, 3650) |
ica |
age breaks for average acquired clinical immunity; default = NULL |
icm |
age breaks for average maternal clinical immunity; default = NULL |
iva |
age breaks for average acquired severe immunity; default = NULL |
ivm |
age breaks for average maternal severe immunity; default = NULL |
id |
age breaks for average immunity to detectability; default = NULL |
ib |
age breaks for average blood immunity; default = NULL |
this function produces contiguous age groups, inclusive of the lower age limit and exclusive of the upper age limit: e.g., c(0, 10, 100) will produce two age groups: 0-9 and 10-99 in days.
This will update the IBM parameters to match the equilibrium parameters and set up the initial human and mosquito population to acheive init_EIR
set_equilibrium(parameters, init_EIR, eq_params = NULL)
set_equilibrium(parameters, init_EIR, eq_params = NULL)
parameters |
model parameters to update |
init_EIR |
the desired initial EIR (infectious bites per person per day over the entire human population) |
eq_params |
parameters from the malariaEquilibrium package, if null. The default malariaEquilibrium parameters will be used |
distribute pre-erythrocytic vaccine to a population in an age range. Efficacy will take effect after the last dose
set_mass_pev( parameters, profile, timesteps, coverages, min_ages, max_ages, min_wait, booster_spacing, booster_coverage, booster_profile )
set_mass_pev( parameters, profile, timesteps, coverages, min_ages, max_ages, min_wait, booster_spacing, booster_coverage, booster_profile )
parameters |
a list of parameters to modify |
profile |
a list of details for the vaccine profile, create with |
timesteps |
a vector of timesteps for each round of vaccinations |
coverages |
the coverage for each round of vaccinations |
min_ages |
for the target population, inclusive (in timesteps) |
max_ages |
for the target population, inclusive (in timesteps) |
min_wait |
the minimum acceptable time since the last vaccination (in timesteps); When using both set_mass_pev and set_pev_epi, this represents the minimum time between an individual being vaccinated under one scheme and vaccinated under another. |
booster_spacing |
the timesteps (following the final primary dose) at which booster vaccinations are administered |
booster_coverage |
a matrix of coverages (timesteps x boosters) specifying the proportion the previously vaccinated population to continue receiving booster doses. The rows of the matrix must be the same size as |
booster_profile |
list of lists representing each booster profile, the outer list must be the same length as |
Parameterise a Mass Drug Administration
set_mda(parameters, drug, timesteps, coverages, min_ages, max_ages)
set_mda(parameters, drug, timesteps, coverages, min_ages, max_ages)
parameters |
a list of parameters to modify |
drug |
the index of the drug to administer |
timesteps |
a vector of timesteps for each round of mda |
coverages |
a vector of the proportion of the target population who receive each round |
min_ages |
a vector of minimum ages of the target population for each round exclusive (in timesteps) |
max_ages |
a vector of maximum ages of the target population for each round exclusive (in timesteps) |
Overrides default (median) model parameters with a single draw from the fitted joint posterior. Must be called prior to set_equilibrium.
set_parameter_draw(parameters, draw)
set_parameter_draw(parameters, draw)
parameters |
the model parameters |
draw |
the draw to use. Must be an integer between 1 and 1000 |
distribute vaccine when an individual becomes a certain age. Efficacy will take effect after the last dose
set_pev_epi( parameters, profile, coverages, timesteps, age, min_wait, booster_spacing, booster_coverage, booster_profile, seasonal_boosters = FALSE )
set_pev_epi( parameters, profile, coverages, timesteps, age, min_wait, booster_spacing, booster_coverage, booster_profile, seasonal_boosters = FALSE )
parameters |
a list of parameters to modify |
profile |
a list of details for the vaccine profile, create with |
coverages |
a vector of coverages for the primary doses |
timesteps |
a vector of timesteps for each change in coverage |
age |
the age when an individual will receive the first dose of the vaccine (in timesteps) |
min_wait |
the minimum acceptable time since the last vaccination (in timesteps); When seasonal_boosters = TRUE, this represents the minimum time between an individual receiving the final dose and the first booster. When using both set_mass_pev and set_pev_epi, this represents the minimum time between an individual being vaccinated under one scheme and vaccinated under another. |
booster_spacing |
the timesteps (following the final primary dose) at which booster vaccinations are administered |
booster_coverage |
a matrix of coverages (timesteps x boosters) specifying the proportion the previously vaccinated population to continue receiving booster doses. The rows of the matrix must be the same size as |
booster_profile |
list of lists representing each booster profile, the outer list must be the same length as |
seasonal_boosters |
logical, if TRUE the first booster timestep is relative to the start of the year, otherwise they are relative to the last primary dose |
Parameterise a perennial malaria chemoprevention (PMC, formerly IPIi)
set_pmc(parameters, drug, timesteps, coverages, ages)
set_pmc(parameters, drug, timesteps, coverages, ages)
parameters |
a list of parameters to modify |
drug |
the index of the drug to administer |
timesteps |
a vector of timesteps for each change in coverage |
coverages |
a vector of proportions of the target population to receive the intervention |
ages |
a vector of ages at which PMC is administered (in timesteps) |
Parameterise a Seasonal Malaria Chemoprevention
set_smc(parameters, drug, timesteps, coverages, min_ages, max_ages)
set_smc(parameters, drug, timesteps, coverages, min_ages, max_ages)
parameters |
a list of parameters to modify |
drug |
the index of the drug to administer |
timesteps |
a vector of timesteps for each round of smc |
coverages |
a vector of the proportion of the target population who receive each round |
min_ages |
a vector of minimum ages of the target population for each round exclusive (in timesteps) |
max_ages |
a vector of maximum ages of the target population for each round exclusive (in timesteps) drug |
Parameterise the mosquito species to use in the model
set_species(parameters, species, proportions)
set_species(parameters, species, proportions)
parameters |
the model parameters |
species |
a list of species presets |
proportions |
a vector of proportions for each species |
The model will apply indoor spraying at timesteps
to a random
sample of the entire human population. The sample size will be a proportion
of the human population taken from the corresponding coverages
.
The sample can contain humans who have already benefited from spraying.
If a human in the sample lives in a sprayed house, the efficacy of the spraying will be returned to the maximum.
The structure for the indoor residual spraying model is documented in the S.I. of 10.1038/s41467-018-07357-w
set_spraying( parameters, timesteps, coverages, ls_theta, ls_gamma, ks_theta, ks_gamma, ms_theta, ms_gamma )
set_spraying( parameters, timesteps, coverages, ls_theta, ls_gamma, ks_theta, ks_gamma, ms_theta, ms_gamma )
parameters |
a list of parameters to modify |
timesteps |
the timesteps at which to spray |
coverages |
the proportion of the population who get indoor spraying |
ls_theta |
matrix of mortality parameters With nrows=length(timesteps), ncols=length(species) |
ls_gamma |
matrix of mortality parameters per timestep With nrows=length(timesteps), ncols=length(species) |
ks_theta |
matrix of feeding success parameters per timestep With nrows=length(timesteps), ncols=length(species) |
ks_gamma |
matrix of feeding success parameters per timestep With nrows=length(timesteps), ncols=length(species) |
ms_theta |
matrix of deterrence parameters per timestep With nrows=length(timesteps), ncols=length(species) |
ms_gamma |
matrix of deterrence parameters per timestep With nrows=length(timesteps), ncols=length(species) |
Parameterise an TBV strategy
set_tbv(parameters, timesteps, coverages, ages)
set_tbv(parameters, timesteps, coverages, ages)
parameters |
a list of parameters to modify |
timesteps |
a vector of timesteps for each round of vaccinations |
coverages |
the coverage for each round of vaccinations |
ages |
a vector of ages of the target population (in years) |
Preset parameters for the SP-AQ drug
SP_AQ_params
SP_AQ_params
An object of class numeric
of length 4.
Use a vector of preset parameters for the SP-AQ drug (sulphadoxine-pyrimethamine and amodiaquine)
Default parameters, from L to R, are: drug_efficacy: 0.9, drug_rel_c: 0.32, drug_prophylaxis_shape: 4.3, drug_prophylaxis_scale: 38.1
Preset parameters for the An. stephensi vector
steph_params
steph_params
An object of class list
of length 7.
Default parameters: species: "steph" blood_meal_rates: 0.3333333 foraging_time: .69 Q0: 0.21 phi_bednets: 0.57 phi_indoors: 0.37 mum: 0.112
parameters reference: https://bmcmedicine.biomedcentral.com/articles/10.1186/s12916-022-02324-1 Values for phi are from: https://github.com/arranhamlet/stephensi_ETH_publication/blob/297352e244f8ed658e8bc3f32be42f011269c7f0/R/functions/cluster_hypercube_sampling_djibouti.R#L14-L21 values for Q0: are the average from: ttps://github.com/cwhittaker1000/stephenseasonality/blob/main/data/bionomic_species_all_LHC_100.csv