cystiSim: 'cystiSim' object

Description Usage Arguments Value Note Author(s) See Also Examples

View source: R/cystiSim.R

Description

Functions to initiate and explore 'cystiSim' objects. A 'cystiSim' object corresponds to multiple runs of a cystiSim model.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
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)

brechtdv@gmail.com

See Also

cystiRun

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
## 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)


cystiSim documentation built on May 19, 2017, 7:29 p.m.
Search within the cystiSim package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.