Risk Effect Models

This module contains tools for modeling the relationship between risk exposure models and disease models.

class vivarium_public_health.risks.effect.RiskEffect(risk, target)[source]

A component to model the impact of a risk factor on the target rate of some affected entity. This component can source data either from builder.data or from parameters supplied in the configuration. For a risk named ‘risk’ that affects ‘affected_risk’ and ‘affected_cause’, the configuration would look like:

configuration:
    effect_of_risk_on_affected_risk:
        exposure_parameters: 2
        incidence_rate: 10
Parameters:
  • risk (str) –

  • target (str) –

CONFIGURATION_DEFAULTS: Dict[str, Any] = {'effect_of_risk_on_target': {'measure': {'log_mean': None, 'log_se': None, 'mean': None, 'relative_risk': None, 'se': None, 'tau_squared': None}}}

A dictionary containing the defaults for any configurations managed by this component. An empty dictionary indicates no managed configurations.

property configuration_defaults: Dict[str, Any]

A dictionary containing the defaults for any configurations managed by this component.

setup(builder)[source]

Defines custom actions this component needs to run during the setup lifecycle phase.

This method is intended to be overridden by subclasses to perform any necessary setup operations specific to the component. By default, it does nothing.

Parameters:

builder (Builder) – The builder object used to set up the component.

Return type:

None

get_distribution_type(builder)[source]
Parameters:

builder (Builder) –

Return type:

str

get_risk_exposure(builder)[source]
Parameters:

builder (Builder) –

Return type:

Callable[[Index], Series]

get_relative_risk_source(builder)[source]

Get the relative risk source for this risk effect model.

Parameters:

builder (Builder) – Interface to access simulation managers.

Returns:

A lookup table containing the relative risk data for this risk effect model.

Return type:

LookupTable

get_population_attributable_fraction_source(builder)[source]

Get the population attributable fraction source for this risk effect model.

Parameters:

builder (Builder) – Interface to access simulation managers.

Returns:

A lookup table containing the population attributable fraction data for this risk effect model.

Return type:

LookupTable

get_target_modifier(builder)[source]
Parameters:

builder (Builder) –

Return type:

Callable[[Index, Series], Series]

register_target_modifier(builder)[source]
Parameters:

builder (Builder) –

Return type:

None

register_paf_modifier(builder)[source]
Parameters:

builder (Builder) –

Return type:

None