Skip to contents

Probability that one initial case leads to an outbreak lasting less than g generations of transmission, with offspring distribution parameters switched after generation two.

Usage

pGenSwitch2(gMax, R0, k0, Rc, kc)

Arguments

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

Value

A vector of probabilities for each number of generations from 1 to gmax

Author

Damon Toth

Examples

# Probability of outbreak lasting less than 1,2,3,...,10 generations:
pGenSwitch2(gMax=10, R0=3, k0=0.1, Rc=0.5, kc=1)
#>  [1] 0.7093553 0.7965927 0.9076851 0.9558791 0.9784157 0.9893231 0.9946899
#>  [8] 0.9973520 0.9986777 0.9993393