cystiSim {cystiSim} | R Documentation |
'cystiSim' object
Description
Functions to initiate and explore 'cystiSim' objects. A 'cystiSim' object corresponds to multiple runs of a cystiSim model.
Usage
cystiSim(n = 100, mod, main = NULL)
report(x, ...)
## S3 method for class 'cystiSim'
print(x, ...)
## S3 method for class 'cystiSim'
summary(object, round = 3, ...)
## S3 method for class 'cystiSim'
plot(x, y, annotate = TRUE, ...)
## S3 method for class 'cystiSim'
report(x, name = "cystiSim", ...)
## S3 method for class 'cystiSim'
elim(x, show = c("m", "y"), ...)
Arguments
n |
Number of iterations (months). |
mod |
cystiSim model. |
main |
cystiSim model label. |
x |
Object of class 'cystiSim'. |
object |
Object of class 'cystiSim'. |
y |
Currently ignored. |
round |
Number of decimal digits to be printed. |
annotate |
Should plot be annotated with summary information? |
name |
Report name. |
show |
Show time till elimination in terms of months or years? |
... |
Other arguments to be passed to generics. |
Value
cystiSim
returns an object of S3 class 'cystiSim'.
Note
For more details and examples, please visit the cystiSim Wiki pages on https://github.com/brechtdv/cystiSim/wiki.
Author(s)
See Also
Examples
## Not run:
## 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
## set seed for reproducibility
set.seed(264)
## need to define coverage and efficacy of all interventions
cov_man_mda <- 0.80
cov_pig_mda <- 0.90
cov_pig_vac <- NULL
eff_man_mda <- 0.70
eff_pig_mda <- 0.90
eff_pig_vac <- NULL
## run the simulations
sim <-
cystiSim(
n = 10,
main = "example",
mod = {
initiate(man_mbeya, pig_mbeya, ph2m, pl2m, m2p, e2p) %>%
update(240) %>%
do_man_mda(coverage = cov_man_mda, efficacy = eff_man_mda) %>%
do_pig_mda(coverage = cov_pig_mda, efficacy = eff_pig_mda) %>%
update(120)
}
)
## summarize results
summary(sim)
## plot simulations (mean and uncertainty interval)
plot(sim)
## create PDF report and plot
report(sim)
## End(Not run)
[Package cystiSim version 0.1.0 Index]