API reference
Probability mass function for final size of a Reed-Frost outbreak.
See Lefevre & Picard (1990) equation 3.10 for details.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
k
|
int, or int array
|
number of total infections |
required |
n
|
int
|
initial number susceptible |
required |
m
|
int
|
initial number infected |
1
|
p
|
float
|
probability of "effective contact" (i.e., infection) |
required |
Returns:
Type | Description |
---|---|
float | NDArray[float64]
|
float, or float array: pmf of the total infection distribution |
Source code in src/reedfrost/__init__.py
Distribution of outbreak sizes of Reed-Frost outbreaks, conditioned on the outbreak being large.
See Barbour & Sergey 2004 (doi:10.1016/j.spa.2004.03.013) corollary 3.4
Parameters:
Name | Type | Description | Default |
---|---|---|---|
k
|
int, or int array
|
number of total infections |
required |
n
|
int
|
initial number of susceptibles |
required |
lambda_
|
float
|
reproduction number |
required |
i_n
|
int
|
initial number of susceptibles. Defaults to 1. |
1
|
Returns:
Type | Description |
---|---|
float | NDArray[float64]
|
float, or float array: pmf of the total infection distribution |