Mortality
The Mortality component
models all-cause mortality and allows for cause-specific
contributions from both explicitly modeled disease components and an aggregated set
of unmodeled causes. It is instantiated as a sub-component of
BasePopulation and
participates in the time_step event to determine
which simulants die, record their cause of death, and calculate
years of life lost.
The component manages three state table attributes:
is_alive— whether the simulant is still livingcause_of_death— the cause assigned to a dying simulantyears_of_life_lost— the residual life expectancy at death, computed from the TMRLE table
Cause-Deleted Mortality
The effective mortality rate is constructed using a cause-deleted pattern. At each time step the component computes:
where:
:term:`ACMR` is all-cause mortality from the configured data source.
Modeled :term:`CSMR` is tracked via a separate
cause_specific_mortality_rateattribute pipeline that disease components contribute to.:term:`Unmodeled <Unmodeled Cause>` CSMR captures causes not explicitly modeled but still potentially affected by modeled risk factors.
During each time step, the combined mortality hazard is converted into death events using random draws. For simulants that die, a cause is selected probabilistically from the hazard-weighted causes.
Unmodeled Causes
Unmodeled causes are those that are not explicitly
modeled in the simulation but should still be represented in mortality accounting.
At setup, the component loads the cause-specific mortality rate for
each named cause and aggregates them into a single unmodeled CSMR term.
RiskEffect components can then modify
this term by registering modifiers on the affected_unmodeled.cause_specific_mortality_rate
attribute pipeline, thereby allowing risks to influence mortality
from causes that are not themselves full disease models.
Omitting Mortality
Mortality is always present as a sub-component of BasePopulation, but
it can be made inert. If you set the all-cause mortality rate to
zero in your configuration and do not register any cause-specific
mortality contributions, no simulant will ever die:
configuration:
mortality:
data_sources:
all_cause_mortality_rate: 0
Alternatively, you can subclass BasePopulation
and omit Mortality from its sub-components entirely.