View source: R/prepare_lifetable.R
| prepare_lifetable | R Documentation |
This function determines populations and deaths by one year age groups.
prepare_lifetable(age_group, population, bhd, fraction_lived = 0.5)
age_group |
|
population |
|
bhd |
|
fraction_lived |
|
Methodology
The conversion follows the methodology of the WHO tool. See the AirQ+ manual "Health impact assessment of air pollution: AirQ+ life table manual" for guidance on how to convert larger age groups to 1 year age groups, section "Estimation of yearly values" \insertCiteWHO2020_reporthealthiar.
fraction_lived is by default 0.5 for all age groups, i.e. the value
that AirQ+ assumes. It determines the probability of dying in the age
interval and how the mid-year population of the age group is split over the
single years of age it contains. It is not a way to control how
the deaths of the age group are distributed over those single years of age.
The same value of fraction_lived has to be used when the resulting
single-year life table is passed on to attribute_lifetable().
The output column fraction_lived_for_attribute is provided for
that purpose.
Last age group
attribute_lifetable() closes the life table at the last age group.
The age groups entered here should therefore reach an age in which
essentially all remaining deaths occur.
See more information in the vignette.
Every age group is treated as a closed age interval of the same length, including the last one. An open-ended top age group such as "90 years old and over" therefore has to be entered as the closed age interval that follows the age groups below it, here [90, 95). Its hazard rate is then the one of the whole open-ended group, which is higher than the hazard rate of a closed age interval at that age, and the deaths of the ages above the interval are placed inside it.
Detailed information about the methodology (including equations) is available in the package vignette. More specifically, see chapters:
This function returns a tibble containing the columns:
population_for_attribute (numeric) containing population values for each age
bhd_for_attribute (numeric) containing baseline health data values for each age
fraction_lived_for_attribute (numeric) containing the fraction of the year lived for each age
and more columns containing input data or results
Alberto Castro & Axel Luyten
Downstream: attribute_lifetable
# Goal: Convert 5-year population and death data into single year life table
results <- prepare_lifetable(
age_group = c(0, 5, 10, 15),
population = c(3387900, 3401300, 3212300, 3026100),
bhd = c(4727, 472, 557, 1323)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.