Final observed outbreak size for negative binomial branching process

dnbbp(x, r, k, condition_on_extinction = FALSE)

pnbbp(q, r, k)

rnbbp(n, r, k, condition_on_extinction = FALSE, max_size = 1e+06)

Arguments

x

final outbreak size, including the index case for d/p/rnbbp

r

effective reproduction number

k

dispersion parameter

condition_on_extinction

logical, should we condition_on_extinction the process on extinction (TRUE) or not (FALSE)

q

as x

n

number of samples to draw

max_size

when drawing samples, the pmf for non-infinite chains is truncated to this size determined. Infinite chains are still possible (and return Inf).

Details

In this model, every individual infects a Negative-Binomially-distributed number of additional individuals.

The functions dnbbp, pnbbp, and rnbbp all provide the "obvious" interfaces to the distribution on the final number of infected individuals, including the index case, seen in a sample.

The PMF may be found in Blumberg et al 2013 (10.1371/journal.pcbi.1002993) Equation 1, where the PMF terms are called r(j), the probability that a transmission chain will have true size j.

When R >= 1.0, the process may not go extinct. In these cases, the outcome is dependent on the choice of condition_on_extinction.

When R >= 1 and condition_on_extinction == FALSE (the default), chains are allowed to become infinitely large. In this case, rnbbp will record this size as Inf.

When R >= 1 and condition_on_extinction == TRUE, the model is conditioned on all chains going extinct. No infinitely-large chains are allowed. Binomial sampling will further reduce the number of observed cases.

Nishiura et al 2012 (https://doi.org/10.1016/j.jtbi.2011.10.039) discuss the R > 1 case when conditioning on extinction.