Skip to contents

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

Usage

pFinalSizeSwitch2(n, j, R0, k0, Rc, kc)

Arguments

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

Value

The probability of the final outbreak size

Examples

#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)
#> [1] 0.009993421