cystiRun {cystiSim} | R Documentation |
'cystiRun' object
Description
Functions to initiate, update and explore 'cystiRun' objects. A 'cystiRun' object corresponds to a single run of a cystiSim model.
Usage
initiate(man, pig,
ph2m, pl2m, m2p, e2p, age.coef = c(0, 0),
slaughter = slaughter_nbinom,
slaughter.args = list(min = 6, max = 36, size = 0.70, mu = 80))
## S3 method for class 'cystiRun'
update(object, n = 1200, verbose = TRUE, ...)
## S3 method for class 'cystiRun'
print(x, from = 200, to = NA, ...)
## S3 method for class 'cystiRun'
plot(x, y = NULL, show = c("PC", "PR", "HT", "EN"),
start = 0, from = 1, to = NA, ...)
prevalence(z)
Arguments
man |
Human population dataframe. |
pig |
Pig population dataframe. |
ph2m |
Pig (Heavy infection) to Man transmission probability. |
pl2m |
Pig (Light infection) to Man transmission probability. |
m2p |
Man to Pig transmission probability. |
e2p |
Environment to Pig transmission probability. |
age.coef |
Optional intercept and slope for the association between age and taeniosis. |
slaughter |
Function that defines the slaughter probability of pigs. |
slaughter.args |
Arguments to be passed to the slaughter function. |
object |
Object of class 'cystiRun'. |
n |
Number of iterations (months). |
verbose |
If |
x |
Object of class 'cystiRun'. |
y |
Currently ignored. |
z |
Vector of infection indicators. |
start |
Origin of plot. |
from |
First iteration to be used in output. |
to |
Last iteration to be used in output. The default value |
show |
Which output should be plotted? |
... |
Arguments to be passed on to generic function. |
Value
initiate
and update
return an object of S3 class 'cystiRun'.
Note
For more details and examples, please visit the cystiSim Wiki pages on https://github.com/brechtdv/cystiSim/wiki.
Author(s)
See Also
Intervention functions: do_man_mda
, do_pig_mda
, do_pig_vac
, do_pig_mda_vac
Examples
## we will use the built-in Mbeya dataset
prevalence(pig_mbeya$cysti)
prevalence(man_mbeya$taenia)
## define transmission probabilities
ph2m <- 0.000174918
pl2m <- 0.000149501
m2p <- 6.85E-05
e2p <- 0.00022611
## first initiate the 'cystiRun' object
mod <- initiate(man_mbeya, pig_mbeya, ph2m, pl2m, m2p, e2p)
## update the model 240 cycles (=20 years)
## this is a burn-in period, needed to obtain steady state
mod <- update(mod, 240)
## apply human mass drug administration
mod <- do_man_mda(mod, efficacy = 0.70, coverage = 0.80)
## apply pig mass drug administration
mod <- do_pig_mda(mod, efficacy = 0.90, coverage = 0.90)
## update the model 120 more cycles (=10 years)
mod <- update(mod, 120)
## plot the cycles
plot(mod, from = 200, start = 40)