| Title: | Calculate Outbreak Probabilities for a Branching Process Model |
|---|---|
| Description: | Quantify outbreak risk posed by individual importers of a transmissible pathogen. Input parameters of negative binomial offspring distributions for the number of transmissions from each infected individual and initial number of infected. Calculate probabilities of final outbreak size and generations of transmission, as described in Toth et al. (2015) <doi:10.3201/eid2108.150170> and Toth et al. (2016) <doi:10.1016/j.epidem.2016.04.002>. |
| Authors: | Damon Toth [aut, cre] (ORCID: <https://orcid.org/0000-0001-7393-4814>), Erin Clancey [ctb] (ORCID: <https://orcid.org/0000-0003-4728-4023>), Centers for Disease Control and Prevention's Center for Forecasting and Outbreak Analytics [fnd] (Cooperative agreement CDC-RFA-FT-23-0069) |
| Maintainer: | Damon Toth <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.2.0 |
| Built: | 2026-06-03 10:54:57 UTC |
| Source: | https://github.com/EpiForeSITE/branchingprocess |
Probability that one initial case leads to an outbreak that eventually dies out (stochastic extinction)
pExtinct(R, k)pExtinct(R, k)
R |
Reproduction number: mean of negative binomial offspring distribution |
k |
Dispersion parameter of negative binomial offspring distribution |
The probability of outbreak extinction
Damon Toth
# Probability that a single case leads to an extinct outbreak when the offspring distribution # is negative binomial with mean 2 and dispersion parameter 0.5: pExtinct(R=2,k=0.5)# Probability that a single case leads to an extinct outbreak when the offspring distribution # is negative binomial with mean 2 and dispersion parameter 0.5: pExtinct(R=2,k=0.5)
Final outbreak size probability
pFinalSize(n, j, R, k)pFinalSize(n, j, R, k)
n |
Number of initial cases in generation 0 |
j |
Total outbreak size (>= n). |
R |
Mean of negative binomial offspring distribution |
k |
Dispersion of negative binomial offspring distribution |
The final size probability
# With 5 initial individuals and negative binomial offspring distribution with mean R=0.2 # and dispersion k=0.1, gives the probability of outbreak extinction with a total number # final outbreak size of exactly 5 to 20 individuals (including the initial 5): pFinalSize(5, 5:20, R=0.2, k=0.1)# With 5 initial individuals and negative binomial offspring distribution with mean R=0.2 # and dispersion k=0.1, gives the probability of outbreak extinction with a total number # final outbreak size of exactly 5 to 20 individuals (including the initial 5): pFinalSize(5, 5:20, R=0.2, k=0.1)
Joint probability of outbreak final size and number of transmission generations
pFinalSizeAndGen(g, n, j, R, k)pFinalSizeAndGen(g, n, j, R, k)
g |
Number of generations. |
n |
Number of initial cases |
j |
Final size |
R |
Reproduction number |
k |
Dispersion parameter |
The joint probability of the final outbreak size and number of transmission generations
Damon Toth
# Probability that 1 initial infection leads to an outbreak of final size 20 over exactly # 3 generations of transmission: pFinalSizeAndGen(g=3,n=1,j=20,R=0.8,k=0.1)# Probability that 1 initial infection leads to an outbreak of final size 20 over exactly # 3 generations of transmission: pFinalSizeAndGen(g=3,n=1,j=20,R=0.8,k=0.1)
Joint probability of outbreak final size and number of transmission generations with offspring distribution parameters switched after generation one
pFinalSizeAndGenSwitch1(g, n, j, R0, k0, Rc, kc)pFinalSizeAndGenSwitch1(g, n, j, R0, k0, Rc, kc)
g |
Number of generations |
n |
Number of initial cases |
j |
Final size |
R0 |
Mean of negative binomial offspring distribution from generation one |
k0 |
Dispersion of negative binomial offspring distribution from generation one |
Rc |
Mean of negative binomial offspring distribution from generation two on |
kc |
Dispersion of negative binomial offspring distribution from generation two on |
The joint probability of outbreak final size and number of transmission generations
Damon Toth
# Probability that 1 initial infection leads to an outbreak of final size 20 over exactly # 3 generations of transmission: pFinalSizeAndGenSwitch1(g=3,n=1,j=20,R0=2,k0=0.1,Rc=0.5,kc=1)# Probability that 1 initial infection leads to an outbreak of final size 20 over exactly # 3 generations of transmission: pFinalSizeAndGenSwitch1(g=3,n=1,j=20,R0=2,k0=0.1,Rc=0.5,kc=1)
Joint probability of outbreak final size and number of transmission generations with offspring distribution parameters switched after generation two
pFinalSizeAndGenSwitch2(g, n, j, R0, k0, Rc, kc)pFinalSizeAndGenSwitch2(g, n, j, R0, k0, Rc, kc)
g |
Number of generations |
n |
Number of initial cases |
j |
Final size |
R0 |
Mean of negative binomial offspring distribution from generation one and two |
k0 |
Dispersion of negative binomial offspring distribution from generation one and two |
Rc |
Mean of negative binomial offspring distribution from generation three on |
kc |
Dispersion of negative binomial offspring distribution from generation three on |
The joint probability of outbreak final size and number of transmission generations
Damon Toth
# Probability that 1 initial infection leads to an outbreak of final size 20 over exactly # 3 generations of transmission: pFinalSizeAndGenSwitch2(g=3,n=1,j=20,R0=2,k0=0.1,Rc=0.5,kc=1)# Probability that 1 initial infection leads to an outbreak of final size 20 over exactly # 3 generations of transmission: pFinalSizeAndGenSwitch2(g=3,n=1,j=20,R0=2,k0=0.1,Rc=0.5,kc=1)
pFinalSizeSwitch1 is the probability that n initial cases lead to an extinguished outbreak of total size j after any number of transmission generations (j includes the n initial cases)
pFinalSizeSwitch1(n, j, R0, k0, Rc, kc)pFinalSizeSwitch1(n, j, R0, k0, Rc, kc)
n |
Number of initial cases in generation 0 |
j |
Total outbreak size (>= n). |
R0 |
Mean of negative binomial offspring distribution from generation one |
k0 |
Dispersion of negative binomial offspring distribution from generation one |
Rc |
Mean of negative binomial offspring distribution from generation two on |
kc |
Dispersion of negative binomial offspring distribution from generation two on |
The probability of the final outbreak size
#With 5 initial cases, the probability that the final outbreak size is 5 to 20 #(including the initial 5): pFinalSizeSwitch1(n=5, j=5:20, R0=2, k0=0.1, Rc=0.2, kc=0.1)#With 5 initial cases, the probability that the final outbreak size is 5 to 20 #(including the initial 5): pFinalSizeSwitch1(n=5, j=5:20, R0=2, k0=0.1, Rc=0.2, kc=0.1)
pFinalSizeSwitch2 is the probability that n initial cases lead to an extinguished outbreak of total size j after any number of transmission generations (j includes the n initial cases), for a branching process with offspring distribution parameters (R0,k0) during the first 2 transmission generations and (Rc,kc) during subsequent generations
pFinalSizeSwitch2(n, j, R0, k0, Rc, kc)pFinalSizeSwitch2(n, j, R0, k0, Rc, kc)
n |
Number of initial cases in generation 0 |
j |
Total outbreak size (>= n). |
R0 |
Mean of negative binomial offspring distribution before the switch |
k0 |
Dispersion of negative binomial offspring distribution before the switch |
Rc |
Mean of negative binomial offspring distribution after the switch |
kc |
Dispersion of negative binomial offspring distribution before the switch |
The probability of the final outbreak size
#With 5 initial cases, the probability that the final outbreak size is 20 #(including the initial 5): pFinalSizeSwitch2(n=5, j=20, R0=2, k0=0.1, Rc=0.2, kc=0.1)#With 5 initial cases, the probability that the final outbreak size is 20 #(including the initial 5): pFinalSizeSwitch2(n=5, j=20, R0=2, k0=0.1, Rc=0.2, kc=0.1)
Probability that one initial case leads to an outbreak lasting less than g generations of transmission.
pGen(gMax, R, k)pGen(gMax, R, k)
gMax |
Maximum number of generations. |
R |
Reproduction number. |
k |
Dispersion parameter. |
A vector of probabilities for each number of generations from 1 to gmax
Damon Toth
# Probability of outbreak lasting less than 1,2,3,...,10 generations: pGen(gMax=10, R=0.9, k=0.1)# Probability of outbreak lasting less than 1,2,3,...,10 generations: pGen(gMax=10, R=0.9, k=0.1)
Probability that one initial case leads to an outbreak lasting less than g generations of transmission, with offspring distribution parameters switched after generation one.
pGenSwitch1(gMax, R0, k0, Rc, kc)pGenSwitch1(gMax, R0, k0, Rc, kc)
gMax |
Maximum number of generations |
R0 |
Basic reproduction number: mean of negative binomial offspring distribution from generation one |
k0 |
Dispersion of negative binomial offspring distribution from generation one |
Rc |
Control reproduction number: mean of negative binomial offspring distribution from generation two plus |
kc |
Dispersion of negative binomial offspring distribution from generation two plus |
A vector of probabilities for each number of generations from 1 to gmax
Damon Toth
# Probability of outbreak lasting less than 1,2,3,...,10 generations: pGenSwitch1(gMax=10, R0=3, k0=0.1, Rc=0.5, kc=1)# Probability of outbreak lasting less than 1,2,3,...,10 generations: pGenSwitch1(gMax=10, R0=3, k0=0.1, Rc=0.5, kc=1)
Probability that one initial case leads to an outbreak lasting less than g generations of transmission, with offspring distribution parameters switched after generation two.
pGenSwitch2(gMax, R0, k0, Rc, kc)pGenSwitch2(gMax, R0, k0, Rc, kc)
gMax |
Maximum number of generations |
R0 |
Basic reproduction number: mean of negative binomial offspring distribution from generation one and two |
k0 |
Dispersion of negative binomial offspring distribution from generation one and two |
Rc |
Control reproduction number: mean of negative binomial offspring distribution from generation three plus |
kc |
Dispersion of negative binomial offspring distribution from generation three plus |
A vector of probabilities for each number of generations from 1 to gmax
Damon Toth
# Probability of outbreak lasting less than 1,2,3,...,10 generations: pGenSwitch2(gMax=10, R0=3, k0=0.1, Rc=0.5, kc=1)# Probability of outbreak lasting less than 1,2,3,...,10 generations: pGenSwitch2(gMax=10, R0=3, k0=0.1, Rc=0.5, kc=1)
Probability of y total transmission directly from x independent infected individuals
pNextGenSize(x, y, R, k)pNextGenSize(x, y, R, k)
x |
Number of infected individuals in generation n |
y |
Number of total transmissions in generation n+1 |
R |
Mean of negative binomial offspring distribution |
k |
Dispersion of negative binomial offspring distribution |
The probability of the given number of transmissions
# With 5 individuals in this generation, what is the probability of # 0 to 15 transmissions in the next generation? pNextGenSize(x=5, y=0:15, R=0.2, k=0.1)# With 5 individuals in this generation, what is the probability of # 0 to 15 transmissions in the next generation? pNextGenSize(x=5, y=0:15, R=0.2, k=0.1)
Probability that n initial cases lead to an outbreak that lasts at least g generations of transmission AND has exactly j total cases after generation g
pSizeAtGen(g, n, j, R, k)pSizeAtGen(g, n, j, R, k)
g |
Number of generations of transmission |
n |
Number of initial cases |
j |
Total size of outbreak after generation g |
R |
Reproduction number: mean of negative binomial offspring distribution |
k |
Dispersion parameter of negative binomial offspring distribution |
The probability of the given outbreak size at the given generation
Damon Toth
#Probability that 10 initial cases leads to an outbreak lasting at least # 3 transmission generations and is of exact size 30 after 3 generations pSizeAtGen(g=3,n=10,j=30,R=2,k=0.5)#Probability that 10 initial cases leads to an outbreak lasting at least # 3 transmission generations and is of exact size 30 after 3 generations pSizeAtGen(g=3,n=10,j=30,R=2,k=0.5)
Probability that n initial cases lead to an outbreak that lasts at least g generations of transmission AND has exactly j total cases after generation g, with offspring distribution parameters switched after generation one
pSizeAtGenSwitch1(g, n, j, R0, k0, Rc, kc)pSizeAtGenSwitch1(g, n, j, R0, k0, Rc, kc)
g |
Number of generations of transmission |
n |
Number of initial cases |
j |
Total size of outbreak after generation g |
R0 |
Basic reproduction number: mean of negative binomial offspring distribution from generation one |
k0 |
Dispersion parameter of negative binomial offspring distribution from generation one |
Rc |
Control reproduction number: mean of negative binomial offspring distribution from generation two plus |
kc |
Dispersion parameter of negative binomial offspring distribution from generation two plus |
The probability of the given outbreak size at the given transmission generation
Damon Toth
#Probability that 10 initial cases leads to an outbreak lasting at least # 3 transmission generations and is of exact size 30 after 3 generations pSizeAtGenSwitch1(g=3,n=10,j=30,R0=2,k0=0.5,Rc=0.5,kc=1)#Probability that 10 initial cases leads to an outbreak lasting at least # 3 transmission generations and is of exact size 30 after 3 generations pSizeAtGenSwitch1(g=3,n=10,j=30,R0=2,k0=0.5,Rc=0.5,kc=1)