Negative Binomial Distribution and Epidemics
Posted onThis is partially just for me to remember how to parameterise a Negative Binomial distribution. Typically, the Negative Binomial is used for the number of Bernoulli trials before the first success or number of successes is achieved (and thus a discrete distribution). For some probability of success, , given failures and successes we can define the probability mass function as:
That is at least the textbook definition. Typically we encounter the negative binomial distribution as a way to deal with over-dispersed Poisson processes (and thus is really a mixture model of gamma and poison distributions).
Basic Reproduction Number and Dispersion
In outbreaks and epidemics we are typically interested in the basic reproduction number, , which represents the average number of secondary infections caused by an index infection in a fully susceptible population. One could simulate such a branching process using a Poisson branching process.
Borrowing some simulation code from Althaus (2015) we can first simulate transmission chains with a Poisson distribution and an R of .8.
R0 <- 2.5
k <- 1
gamma_params <- epitrix::
serial_interval <- distcrete::
# Set seed for random number generator
# Number of simulation runs
runs <- 1e2
# Number of initial cases
seed <- 1
# Initialize plot
# Set color scheme for different trajectories
cols <-
# Simulate outbreak trajectories
for(i in 1:runs) {
cases <- seed
t <-
times <- t
while (cases > 0) {
secondary <-
t.new <-
for (j in 1:) {
t.new <-
}
cases <-
t <- t.new
times <-
}
}
Super-Spreading
One of the buzzwords with the SARS-CoV-2 Pandemic has been super-spreading, and there is evidence that super-spreading events play a large role in the transmission of SARS-CoV-2 (Endo et al. 2020). Super-spreading refers to those index cases which transmit to a larger number of people than would have been expected (Lloyd-Smith et al. 2005). Larger than expected is a bit of a loose definition, do have a way of measuring this using our reproduction number (or even the basic reproduction number). Now it is true that the reproduction number and basic reproduction number are both estimated themselves from the data with associated measurement and missing data problems, but this is a thought exercise so let’s assume we know them.
We measure the degree of super-spreading using the dispersion parameter called k (or ). The closer the dispersion parameter is to 1, the more Poisson-like is the branching process. Conversely, as k the dispersion parameter approaches 0, the more super-spreading events there will be. We can see this as we incease the number of samples that the negative binomial with converges to the mean of Poisson distribution, while the smaller does not converge.
sims <-
With the same reproduction number, but a dispersion of 0.1, we can see that some of the transmission chains are much larger. Thus is could be said that super-spreading transmission might be slow to take hold (easy to have chains that terminate quickly), but it can start wildfires; this tranmission pattern and its effect on controlling epidemics is discussed in Fraser et al. (2004).
gamma_params <- epitrix::
serial_interval <- distcrete::
# Set seed for random number generator
# Number of simulation runs
runs <- 1e2
# Number of initial cases
seed <- 1
# Initialize plot
# Set color scheme for different trajectories
cols <-
# Simulate outbreak trajectories
collector <-
for(i in 1:runs) {
cases <- seed
t <-
times <- t
while (cases > 0) {
secondary <-
t.new <-
for (j in 1:) {
t.new <-
}
cases <-
t <- t.new
times <-
}
collector <-
}
transmission_chains <- - 1
Proportion Responsible
Again, borrowing code from Endo et al. (2020) to estimate the proportion of infections that are responsible for a given proportion of cases.
nb_fit <- fitdistrplus::
{
qm1=
remq=1-prop-
remx=remq/
q=qm1+1
1--*remx
}
[1] 0.02311288
Althaus, Christian L. 2015. “Ebola Superspreading.” The Lancet Infectious Diseases 15 (5): 507–8. https://doi.org/10.1016/S1473-3099(15)70135-0.
Endo, Akira, Centre for the Mathematical Modelling of Infectious Diseases COVID-19 Working Group, Sam Abbott, Adam J. Kucharski, and Sebastian Funk. 2020. “Estimating the Overdispersion in COVID-19 Transmission Using Outbreak Sizes Outside China.” Wellcome Open Research 5 (April): 67. https://doi.org/10.12688/wellcomeopenres.15842.1.
Fraser, Christophe, Steven Riley, Roy M. Anderson, and Neil M. Ferguson. 2004. “Factors That Make an Infectious Disease Outbreak Controllable.” Proceedings of the National Academy of Sciences 101 (16): 6146–51. https://doi.org/10.1073/pnas.0307506101.
Lloyd-Smith, J. O., S. J. Schreiber, P. E. Kopp, and W. M. Getz. 2005. “Superspreading and the Effect of Individual Variation on Disease Emergence.” Nature 438 (7066): 355–59. https://doi.org/10.1038/nature04153.
Citation
BibTex citation:
@online{dewitt2020
author = {Michael E. DeWitt},
title = {Negative Binomial Distribution and Epidemics},
date = 2020-09-01,
url = {https://michaeldewittjr.com/articles/2020-08-30-negative-binomial-distribution-and-epidemics},
langid = {en}
}
For attribution, please cite this work as:
Michael E. DeWitt. 2020. "Negative Binomial Distribution and Epidemics." September 1, 2020. https://michaeldewittjr.com/articles/2020-08-30-negative-binomial-distribution-and-epidemics