Nowcast parameters¶
Probability mass functions¶
get_nnh_generation_interval_pmf ¶
Filter and extract the generation interval probability mass function (PMF) based on disease and date filters.
This function retrieves epidemiological parameters from datacat.public.stf catalog and returns the generation interval PMF.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
disease
|
str
|
The canonical disease name to filter for ("covid", "flu", or "rsv"). |
required |
as_of
|
date | None
|
The date for which parameters should be valid. Parameters must have start_date <= as_of < end_date. Defaults to latest estimates. |
None
|
Returns:
| Type | Description |
|---|---|
list[float]
|
A list representing the generation interval distribution. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If exactly one generation_interval row is not found. |
get_nnh_delay_pmf ¶
Filter and extract the delay probability mass function (PMF) based on disease and date filters.
This function retrieves epidemiological parameters from datacat.public.stf catalog and returns the delay PMF.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
disease
|
str
|
The canonical disease name to filter for ("covid", "flu", or "rsv"). |
required |
as_of
|
date | None
|
The date for which parameters should be valid. Parameters must have start_date <= as_of < end_date. Defaults to latest estimates. |
None
|
Returns:
| Type | Description |
|---|---|
list[float]
|
A list representing the delay distribution. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If exactly one delay row is not found. |
get_nnh_right_truncation_pmf ¶
get_nnh_right_truncation_pmf(state_abb: str, disease: str, as_of: date | None = None, reference_date: date | None = None) -> list[float]
Filter and extract the right truncation probability mass function (PMF) based on disease, location, and date filters.
This function retrieves epidemiological parameters from datacat.public.stf catalog and returns the right truncation PMF.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
state_abb
|
str
|
Location abbreviation (geo_value) used to filter right_truncation parameters. |
required |
disease
|
str
|
The canonical disease name to filter for ("covid", "flu", or "rsv"). |
required |
as_of
|
date | None
|
The date for which parameters should be valid. Parameters must have start_date <= as_of < end_date. Defaults to latest estimates. |
None
|
reference_date
|
date | None
|
The reference date for filtering. Defaults to as_of value. Selects the most recent parameter with reference_date <= this value. |
None
|
Returns:
| Type | Description |
|---|---|
list[float]
|
A list representing the right truncation distribution. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If exactly one right_truncation row is not found when required. |
Version resolution¶
resolve_nnh_generation_interval_pmf_version ¶
Resolve the parameter-estimates version used for the generation PMF.
resolve_nnh_delay_pmf_version ¶
Resolve the parameter-estimates version used for the delay PMF.
resolve_nnh_right_truncation_pmf_version ¶
Resolve the parameter-estimates version used for right truncation.