Skip to contents

Containment is defined as the size of the transmission chain not reaching the case_threshold (default = 100).

Usage

probability_contain(
  R,
  k,
  num_init_infect,
  ind_control = 0,
  pop_control = 0,
  stochastic = FALSE,
  ...,
  case_threshold = 100,
  offspring_dist
)

Arguments

R

A number specifying the R parameter (i.e. average secondary cases per infectious individual).

k

A number specifying the k parameter (i.e. overdispersion in offspring distribution from fitted negative binomial).

num_init_infect

An integer (or at least "integerish" if stored as double) specifying the number of initial infections.

ind_control

A numeric specifying the strength of individual-level control measures. Between 0 (default) and 1 (maximum).

pop_control

A numeric specifying the strength of population-level control measures. Between 0 (default) and 1 (maximum).

stochastic

Whether to use a stochastic branching process model or the analytical probability of extinction. Default (FALSE) is to use the analytical calculation.

...

<dynamic-dots> Named elements to replace default arguments in bpmodels::chain_sim(). See details.

case_threshold

A number for the threshold of the number of cases below which the epidemic is considered contained.

offspring_dist

An <epidist> object. An S3 class for working with epidemiological parameters/distributions, see epiparameter::epidist().

Value

A number for the probability of containment.

Details

When using stochastic = TRUE, the default arguments to simulate the transmission chains with bpmodels::chain_sim() are 1e5 replicates, a negative binomial (nbinom) offspring distribution, parameterised with R (and pop_control if > 0) and k.

References

Lloyd-Smith, J. O., Schreiber, S. J., Kopp, P. E., & Getz, W. M. (2005) Superspreading and the effect of individual variation on disease emergence. Nature, 438(7066), 355-359. doi:10.1038/nature04153

Examples

# population-level control measures
probability_contain(R = 1.5, k = 0.5, num_init_infect = 1, pop_control = 0.1)
#> [1] 0.8213172

# individual-level control measures
probability_contain(R = 1.5, k = 0.5, num_init_infect = 1, ind_control = 0.1)
#> [1] 0.8391855

# both levels of control measures
probability_contain(
  R = 1.5,
  k = 0.5,
  num_init_infect = 1,
  ind_control = 0.1,
  pop_control = 0.1
)
#> [1] 0.8915076

# multi initial infections with population-level control measures
probability_contain(R = 1.5, k = 0.5, num_init_infect = 5, pop_control = 0.1)
#> [1] 0.3737271