Skip to contents

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)

Usage

pFinalSizeSwitch1(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 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

Value

The probability of the final outbreak size

Examples

#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)
#> Warning: numerical expression has 16 elements: only the first used
#> Warning: numerical expression has 16 elements: only the first used
#>  [1] 0.2182179       NaN       NaN       NaN       NaN       NaN       NaN
#>  [8]       NaN       NaN       NaN       NaN       NaN       NaN       NaN
#> [15]       NaN       NaN