View source: R/hrp2-simulation.R
hrp2_Simulation | R Documentation |
hrp2_Simulation
simulates an individual based malaria system considering
multiplicity of infection and infection status of individuals.
hrp2_Simulation( ID = NULL, saved.rds = NULL, root = NULL, direct.input = NULL, years = 0.5, time.step = 1, states = c(1, 2, 3, 4, 5, 6), storage = 50, storage_capture = 30, just_storage_results = FALSE, N = 1000, max.age = 60, strains.0 = 10, desired.freq = NULL, d.death = 21, EIR = 20/365, a.0 = 8 * 365, rho = 0.85, zeta.sd = 1.67, omega = 0.8405912, theta = 1, ft = 0.4, rdt.det = 1, rdt.nonadherence = 0, microscopy.use = 0, include.nmf = FALSE, fever.age.breaks = c(-0.1, 1, 2, 3, 4, 5, 7, 9, 11, 13, 15, 20, 25, 30, 101), annual.nmf.per.age.bracket = c(2.235, 1.841, 1.503, 1.175, 0.928, 0.67, 0.486, 0.512, 0.475, 0.429, 0.652, 0.747, 0.804, 0.789), nmf.multiplier = 1, ss = NULL, fitness = 1, mu.0 = 0.132, beta = c(0.05879106, 0.07108894), a.k = 0.30677, delay.mos = 10, delay.gam = 12, d.E = 12, d.I = 200, d.T = 5, d.D = 5, d.U = 110, d.P = 25, d.A = d.I - d.D, d.1 = 0.160527, d.ID = 10 * 365, I.D0 = 1.577533, k.D = 0.476614, u.D = 9.44512, a.D = 8001.99, f.D0 = 0.007055, g.D = 4.8183, b.0 = 0.590076, b.1 = 0.5, d.B = 10 * 365, I.B0 = 43.8787, k.B = 2.15506, u.B = 7.19919, phi.0 = 0.791666, phi.1 = 0.000737, d.CA = 10950, I.C0 = 18.02366, k.C = 2.36949, u.C = 6.06349, P.M = 0.774368, d.CM = 67.6952, g.1 = 1.82425, c.S = 0, c.D = 0.0676909, c.T = 0.322 * c.D, c.U = 0.0062, c.A = 0, c.P = 0 )
ID |
ID of model run saved object when using didehpc tools. Default = NULL |
saved.rds |
File path for saved model run as rds. Default = NULL. Takes priority over ID/root |
root |
Name of context root when using didehpc tools to submit and save model runs. Default = NULL. |
direct.input |
R object for old model run to be restarted. Default = NULL. Takes priority over saved.rds and ID/root |
years |
Length of Simulation (years). Default = 0.5 |
time.step |
Simulation time interval considered in days. Has to be 1. |
states |
Vector of the compartmental states. Default = c(1, 2, 3, 4, 5, 6), which are c("S","D","A","U","T","P") |
storage |
Number of last time steps to store. If storage = 0 (default), then all results are stored |
storage_capture |
Number of previous time steps used to calculate mean measures for series. Default = 30 |
just_storage_results |
Boolean for keeping just the storage results. ## Demographic paramaters |
N |
Population Size. Default = 1000 |
max.age |
Maximum age (years). Default = 100 |
strains.0 |
Ratio of wild type strains to hrp2 at initialisation. Must be an integer. Default = 10 |
desired.freq |
Desired hrp2 deletion frequency to be enforced when a previous simulation is reloaded |
d.death |
Average life expectancy (years). Deafult = 21 ## Epidemiological Parameters |
EIR |
Maximum EIR / day. Default = 20/365, |
a.0 |
Age-dependent biting parameter (days). Default = 8*365 |
rho |
Age-dependent biting parameter (days). Default = 0.85 |
zeta.sd |
sd of lognormal distribution used to generate indiviudal specific biting. Default = 1.67 |
omega |
BM age scaling parameter. Default = 0.75 ## Entomological parameters |
theta |
Seasonal effects. Default = 1 |
ft |
Probability of receiving assesment. Default = 0.4 |
rdt.det |
Probability of detecting malaria given mono infection of hrp2' strains. Default = 1 |
rdt.nonadherence |
Probability of non adherence to test result. Default = 0, i.e. perfect adherence |
microscopy.use |
Probability of microscopy use. Default = 0, i.e. no microscopy |
include.nmf |
Boolean detailing whether to include nmf section. Default = FALSE |
fever.age.breaks |
Age breaks for fevers |
annual.nmf.per.age.bracket |
Annual number of non malarial fevers for each age bracket in fever.age.breaks. Default is mean across 5 representative surveys from Burundi 2012, Liberia 2009/2011 and Nigeria 2010/2015 |
nmf.multiplier |
Multiplication for annual.nmf.per.age.bracket to introduce sensitivity. Default = 1 ## delays and durations |
ss |
Seasonal fourier terms for rainfall. 7 needed (intercept and first 3 cos and sin terms). Default = NULL |
fitness |
Relative fitness of hrp2 deletions. Default = 1, i.e. no fitness cost. ## Diagnostics and nmf |
mu.0 |
Baseline mosquito mortality. Default = 0.132 |
beta |
Birthrate in form of y = beta[1]*EIR + beta[2]. Default = c(0.0572289,0.0696121) |
a.k |
Daily biting rate. Default = 0.30667 |
delay.mos |
Mosquito extrinsic incubation period (days). Default = 10 |
delay.gam |
Delay from emergence of blood-stage parasites to onward infectivity (days). Default = 12.5 |
d.E |
Latent period delay in pre-erythrocytic stage (days). Default = 12 |
d.I |
Patent infection duration with no immunity (including disease) (days). Default = 200 |
d.T |
Clinical disease duration with treatment (days). Default = 5 |
d.D |
Clinical disease duration without treatment (days). Default = 5 |
d.U |
Sub-patent infection duration (days). Default = 100 |
d.P |
Prophylaxis with SP following treatment duration (days). Default = 25 |
d.A |
Asymptomatic infection duration (days). Default = d.I - d.D ## Pre-erythrocytic immunity parameters |
d.1 |
= 0.161 Probability with maximum immunity |
d.ID |
= 10*365 Inverse of decay rate |
I.D0 |
Scale parameter. Default = 1.58 |
k.D |
Shape parameter. Default = 0.477 |
u.D |
Duration in which immunity is not boosted (days). Default = 9.45 |
a.D |
Scale parameter relating age to immunity (days). Default = 21.923*365 |
f.D0 |
Parameter relating age to immunity. Default = 0.0071 |
g.D |
Shape parameter relating age to immunity. Default = 4.81 ## Blood stage immunity parameters |
b.0 |
Probability with no immunity. Default = 0.590 |
b.1 |
Maximum relative reduction. Default = 0.5 |
d.B |
Inverse of decay rate (days). Default = 10*365 |
I.B0 |
Scale parameter. Default = 43.9 |
k.B |
Shape parameter. Default = 2.16 |
u.B |
Duration in which immunity is not boosted (days). Default = 7.2 ## Acquired and maternal immunity parameters |
phi.0 |
Probability with no immunity. Default = 0.7916 |
phi.1 |
Maximum relative reduction. Default = 0.00074 |
d.CA |
Inverse of decay rate (days). Default = 30*365 |
I.C0 |
Scale parameter. Default = 18.0 |
k.C |
Shape parameter. Default = 2.37 |
u.C |
Duration in which immunity is not boosted (days). Default = 6.06 |
P.M |
New-born immunity relative to mother’s. Default = 0.774 |
d.CM |
Inverse of decay rate of maternal immunity (days). Default = 67.7 ## contributions to infectious reservoir by state and age |
g.1 |
Relates infectiousness probability of detection. Default = 1.82 ## Other params to do with reloading model runs |
c.S |
Contribution from S. Default = 0 |
c.D |
Contribution from D. Default = 0.068 |
c.T |
Contribution from T. Default = 0.32 * c.D |
c.U |
Contribution from U. Default = 0.0062 |
c.A |
Contribution from A. Default = c.U + (c.D - c.U)*q^g.1, where q is the probability of detection of parasites as calculated using pre-erythrcytic immunity and age |
c.P |
Contribution from P. Default = 0 |
The simulator considers individuals to progress through the Griffin 2016 model.
The model also introduces a further acknowledgement of the hrp2 strains present in hosts, and the effects of this on detection.
The model first allocates a fixed length for all storage and proceeds in a ring like fashion allowing for delays to be incorporated.
## Simulation parameters
Result a list of 59 elements including the following Time - Vector of time steps considered Status - Matrix of individuals' infection status by Time Last_Infection_Time - Vector of individual's last infection Last_Bite_Time - Vector of individual's last bite Age - Vector of individual's ages N.Sens - Matrix of individuals' MOI of RDT sensitive strains by Time N.Dels - Matrix of individuals' MOI of RDT resistant strains by Time I.B - Vector of individual's blood stage immunity I.CA - Vector of individual's acquired immunity I.CM - Vector of individual's maternal immunity I.D - Vector of individual's pre-erythrocytic immunity Counter - Simulation step counter d.EIR - daily EIR in individuals > 18 years I.Reservoir - Vector of each strains weighted contribution to the last step's I.Reservoir Sv - Susceptible mosquito population Ev - Exposed mosquito population Iv - Infected mosquito population Prev - Daily prevalence N.Sens/N.Dels - sum of sensitive to diagnostic and deletion strains Incidence - Clinical cases / population / per day Mono - monoinfected individual proportions FOIv - Force of infection to vectorsf S. ... - Series storage of various of the above
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.