| Title: | Quantifying and Monetizing Health Impacts Attributable to Exposure |
| Version: | 0.2.3 |
| Description: | This R package has been developed with a focus on air pollution and noise but can be applied to other exposures. The initial development has been funded by the European Union project BEST-COST. Disclaimer: It is work in progress and the developers are not liable for any calculation errors or inaccuracies resulting from the use of this package. Selection of relevant references (in chronological order): WHO (2003) https://www.who.int/publications/i/item/9241546204, Murray et al. (2003) <doi:10.1186/1478-7954-1-1>, Miller & Hurley (2003) <doi:10.1136/jech.57.3.200>, Steenland & Armstrong (2006) <doi:10.1097/01.ede.0000229155.05644.43>, WHO (2011) https://iris.who.int/items/723ab97c-5c33-4e3b-8df1-744aa5bc1c27, GBD 2019 Risk Factors Collaborators (2020) <doi:10.1016/S0140-6736(20)30752-2>. |
| License: | GPL (≥ 3) |
| URL: | https://swisstph.github.io/healthiar/, https://github.com/SwissTPH/healthiar, https://doi.org/10.5281/zenodo.18220361 |
| BugReports: | https://github.com/SwissTPH/healthiar/issues |
| Encoding: | UTF-8 |
| RoxygenNote: | 7.3.3 |
| Imports: | dplyr, tidyr, purrr, tibble, Rdpack |
| RdMacros: | Rdpack |
| Depends: | R (≥ 4.2.0) |
| LazyData: | true |
| Config/testthat/edition: | 3 |
| VignetteBuilder: | knitr |
| Suggests: | sf, terra, exactextractr, testthat, devtools, knitr, rmarkdown |
| Config/Needs/website: | rmarkdown |
| NeedsCompilation: | no |
| Packaged: | 2026-02-19 18:15:03 UTC; castal |
| Author: | Alberto Castro |
| Maintainer: | Alberto Castro <alberto.castrofernandez@swisstph.ch> |
| Repository: | CRAN |
| Date/Publication: | 2026-02-19 18:40:02 UTC |
healthiar: Quantifying and Monetizing Health Impacts Attributable to Exposure
Description
This R package has been developed with a focus on air pollution and noise but can be applied to other exposures. The initial development has been funded by the European Union project BEST-COST. Disclaimer: It is work in progress and the developers are not liable for any calculation errors or inaccuracies resulting from the use of this package. Selection of relevant references (in chronological order): WHO (2003) https://www.who.int/publications/i/item/9241546204, Murray et al. (2003) doi:10.1186/1478-7954-1-1, Miller & Hurley (2003) doi:10.1136/jech.57.3.200, Steenland & Armstrong (2006) doi:10.1097/01.ede.0000229155.05644.43, WHO (2011) https://iris.who.int/items/723ab97c-5c33-4e3b-8df1-744aa5bc1c27, GBD 2019 Risk Factors Collaborators (2020) doi:10.1016/S0140-6736(20)30752-2.
Author(s)
Maintainer: Alberto Castro alberto.castrofernandez@swisstph.ch (ORCID)
Authors:
Axel Luyten (ORCID)
Other contributors:
Arno Pauwels (ORCID) [contributor]
Liliana Vazquez Fernandez (ORCID) [contributor]
Gianni Ardielli (ORCID) [contributor]
Iracy Pimenta (ORCID) [contributor]
Susanne Breitner (ORCID) [contributor]
Carl Baravelli (ORCID) [contributor]
Vanessa Gorasso (ORCID) [contributor]
Maria Lepnurm (ORCID) [contributor]
Andreia Novais (ORCID) [contributor]
Maria Jose Rueda Lopez (ORCID) [contributor]
Minh Nhat Pham (ORCID) [contributor]
Ana Barbosa (ORCID) [contributor]
Joao Vasco Santos (ORCID) [contributor]
Anette Kocbach Bolling (ORCID) [contributor]
See Also
Useful links:
Report bugs at https://github.com/SwissTPH/healthiar/issues
Add meta-information to the data frame containing the input data
Description
This function adds meta-information of the input data within the data frame containing the input data.
Usage
add_info(df, info)
Arguments
df |
|
info |
|
Value
This function returns a data frame with binding the input data with the info columns (info_ is added to the column names)
Author(s)
Alberto Castro & Axel Luyten
Attribute health impacts to an environmental stressor
Description
This function calculates the attributable health impacts (mortality or morbidity) due to exposure to an environmental stressor (air pollution or noise), using either relative risk (RR) or absolute risk (AR).
Arguments for both RR & AR pathways
-
approach_risk -
exp_central,exp_lower,exp_upper -
cutoff_central,cutoff_lower,cutoff_upper -
erf_eq_central,erf_eq_lower,erf_eq_upper
Arguments only for RR pathways
-
rr_central,rr_lower,rr_upper -
rr_increment -
erf_shape -
bhd_central,bhd_lower,bhd_upper -
prop_pop_exp
Argument for AR pathways
-
pop_exp
Optional arguments for both RR & AR pathways
-
geo_id_micro,geo_id_macro, -
age_group,sex,info,population -
dw_central,dw_lower,dw_upper -
duration_central,duration_lower,duration_upper
Usage
attribute_health(
approach_risk = "relative_risk",
exp_central,
exp_lower = NULL,
exp_upper = NULL,
cutoff_central = 0,
cutoff_lower = NULL,
cutoff_upper = NULL,
pop_exp = NULL,
erf_eq_central = NULL,
erf_eq_lower = NULL,
erf_eq_upper = NULL,
rr_central = NULL,
rr_lower = NULL,
rr_upper = NULL,
rr_increment = NULL,
erf_shape = NULL,
bhd_central = NULL,
bhd_lower = NULL,
bhd_upper = NULL,
prop_pop_exp = 1,
geo_id_micro = "a",
geo_id_macro = NULL,
age_group = "all",
sex = "all",
dw_central = NULL,
dw_lower = NULL,
dw_upper = NULL,
duration_central = NULL,
duration_lower = NULL,
duration_upper = NULL,
info = NULL,
population = NULL
)
Arguments
approach_risk |
|
exp_central, exp_lower, exp_upper |
|
cutoff_central, cutoff_lower, cutoff_upper |
|
pop_exp |
|
erf_eq_central, erf_eq_lower, erf_eq_upper |
|
rr_central, rr_lower, rr_upper |
|
rr_increment |
|
erf_shape |
|
bhd_central, bhd_lower, bhd_upper |
|
prop_pop_exp |
|
geo_id_micro, geo_id_macro |
|
age_group |
|
sex |
|
dw_central, dw_lower, dw_upper |
|
duration_central, duration_lower, duration_upper |
|
info |
|
population |
|
Details
What you put in is what you get out
The health metric you put in (e.g. absolute disease cases, deaths per 100 000 population, DALYs, prevalence, incidence, ...) is the one you get out.
Exception: if you enter a disability weight (via the dw_... arguments) the attributable impact will be in YLD.
Function arguments
exp_central, exp_lower, exp_upper
In case of exposure bands enter only one exposure value per band (e.g. the means of the lower and upper bounds of the exposure bands).
cutoff_central, cutoff_lower, cutoff_upper
The cutoff level refers to the exposure level below which no health effects occur in the same unit as the exposure. If exposure categories are used, the length of this input must be the same as in the exp_... argument(s).
pop_exp
Only applicable in AR pathways; always required. In AR pathways the population exposed per exposure category is multiplied with the corresonding category-specific risk to obtain the absolute number of people affected by the health outcome.
erf_eq_central, erf_eq_lower, erf_eq_upper
Required in AR pathways; in RR pathways required only if rr_... arguments not specified. Enter the exposure-response function as a function, e.g. output from stats::splinefun() or stats::approxfun(), or as a string formula, e.g. "3+c+c^2" (with the c representing the concentration/exposure).
If you have x-axis (exposure) and y-axis (relative risk) value pairs of multiple points lying on the the exposure-response function, you could use e.g. stats::splinefun(x, y, method="natural") to derive the exposure-response function (in this example using a cubic spline natural interpolation).
rr_increment
Only applicable in RR pathways. Relative risks from the literature are valid for a specific increment in the exposure, in case of air pollution often 10 or 5 \mu g/m^3).
bhd_central, bhd_lower, bhd_upper
Only applicable in RR pathways. Baseline health data for each exposure category must be entered.
prop_pop_exp
Only applicable in RR pathways. In RR pathways indicates the fraction(s) (value(s) from 0 until and including 1) of the total population exposed to the exposure categories. See equation of the population attributable fraction for categorical exposure below.
geo_id_macro, geo_id_micro
Only applicable in assessments with multiple geographic units. For example, if you provide the names of the municipalities under analysis to geo_id_micro, you might provide to geo_id_macro the corresponding region / canton / province names.
Consequently, the vectors fed to geo_id_micro and geo_id_macro must be of the same length.
age_group
Can be either numeric or character. If it is numeric, it refers to the first age of the age group. E.g. c(0, 40, 80) means age groups [0, 40), [40, 80), >=80].
info
Optional argument. Information entered to this argument will be added as column(s) names info_1, info_2, info_... to the results table. These additional columns can be used to further stratify the analysis in a secondary step (see example below).
population
Optional argument. The population entered here is used to determine impact rate per 100 000 population. Note the requirement for the vector length in the paragraph Assessment of multiple geographic units below.
duration_central, duration_lower, duration_upper
Only applicable in assessments of YLD (years lived with disability). Measured in years. A value of 1 (year) refers to the prevalence-based approach, while values above 1 to the incidence-based approach.
Methodology
This function can quantify the attributable health impacts by means of a relative risk or an absolute risk (depending on the health outcome).
Relative risk: The comparative risk assessment approach (Murray et al. 2003) is applied by obtaining the population attributable fraction (percent of cases that are attributable to the exposure) based on the relative risk (WHO 2003; Steenland and Armstrong 2006; GBD 2019 Risk Factors Collaborators 2020; Soares et al. 2022; Pozzer et al. 2023; Lehtomäki et al. 2025).
Absolute risk: The attributable cases are directly derived from population exposed (WHO 2011).
Detailed information about the methodology (including equations) is available in the package vignette. More specifically, see chapters:
Value
This function returns a list containing:
1) health_main (tibble) containing the main results;
-
impact(numericcolumn) attributable health burden/impact -
pop_fraction(numericcolumn) population attributable fraction; only applicable in relative risk assessments And many more
2) health_detailed (list) containing detailed (and interim) results.
-
input_args(list) containing all the argument inputs used in the background -
input_table(tibble) containing the inputs after preparation -
results_raw(tibble) containing results for all combinations of input (geo units, uncertainty, age and sex specific data...) -
results_by_...(tibble) containing results stratified by each geographic unit, age or sex.
Author(s)
Alberto Castro & Axel Luyten
References
GBD 2019 Risk Factors Collaborators (2020).
“Global burden of 87 risk factors in 204 countries and territories, 1990–2019.”
The Lancet.
doi:10.1016/S0140-6736(20)30752-2.
Lehtomäki H, Aasvang GM, Sulo G, Denby BR, Hänninen OO, Brauer M, Pereira G, Dadras O, Bølling AK (2025).
“Burden of disease attributable to PM2.5 at low exposure levels: impact of methodological choices.”
Environmental Health, 25(1), 4.
ISSN 1476-069X, doi:10.1186/s12940-025-01250-y.
Murray CJ, Ezzati M, Lopez AD, Rodgers A, Hoorn SV (2003).
“Comparative risk assessment: conceptual framework and design.”
Epidemiology, 14(4), 447-458.
doi:10.1186/1478-7954-1-1.
Pozzer A, Anenberg SC, Dey S, Haines A, Lelieveld J, Chowdhury S (2023).
“Mortality Attributable to Ambient Air Pollution: A Review of Global Estimates.”
GeoHealth, 7(1), e2022GH000711.
doi:10.1029/2022GH000711, e2022GH000711 2022GH000711, https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1029/2022GH000711, https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2022GH000711.
Soares J, González Ortiz A, Gsella A, Horálek J, Plass D, Kienzler S (2022).
“Health risk assessment of air pollution and the impact of the new WHO guidelines (Eionet Report – ETC HE 2022/10).”
European Topic Centre on Human Health and the Environment.
doi:10.5281/zenodo.7405988.
Steenland K, Armstrong B (2006).
“An overview of methods for calculating the burden of disease due to specific risk factors.”
Epidemiology, 17(5), 512–519.
doi:10.1097/01.ede.0000229155.05644.43.
WHO (2003).
“Introduction and methods: Assessing the environmental burden of disease at national and local levels.”
World Health Organization.
https://www.who.int/publications/i/item/9241546204.
WHO (2011).
“Burden of disease from environmental noise: Quantification of healthy life years lost in Europe.”
World Health Organization.
https://www.who.int/publications/i/item/burden-of-disease-from-environmental-noise-quantification-of-healthy-life-years-lost-in-europe.
See Also
Upstream:
prepare_exposure(only if no exposure data available)Alternative:
attribute_lifetable,get_paf,get_riskDownstream:
attribute_mod,compare,daly,multiexpose,standardize,monetize,socialize
Examples
# Goal: attribute lung cancer cases to population-weighted PM2.5 exposure
# using relative risk
results <- attribute_health(
erf_shape = "log_linear",
rr_central = 1.369, # Central relative risk estimate
rr_increment = 10, # per \mu g / m^3 increase in PM2.5 exposure
exp_central = 8.85, # Central exposure estimate in \mu g / m^3
cutoff_central = 5, # \mu g / m^3
bhd_central = 30747 # Baseline health data: lung cancer incidence
)
results$health_main$impact_rounded # Attributable cases
# Goal: attribute cases of high annoyance to (road traffic) noise exposure
# using absolute risk
results <- attribute_health(
approach_risk = "absolute_risk",
exp_central = c(57.5, 62.5, 67.5, 72.5, 77.5),
pop_exp = c(387500, 286000, 191800, 72200, 7700),
erf_eq_central = "78.9270-3.1162*c+0.0342*c^2"
)
results$health_main$impact_rounded # Attributable high annoyance cases
# Goal: attribute disease cases to PM2.5 exposure in multiple geographic
# units, such as municipalities, provinces, countries, ...
results <- attribute_health(
geo_id_micro = c("Zurich", "Basel", "Geneva", "Ticino"),
geo_id_macro = c("Ger","Ger","Fra","Ita"),
rr_central = 1.369,
rr_increment = 10,
cutoff_central = 5,
erf_shape = "log_linear",
exp_central = c(11, 11, 10, 8),
bhd_central = c(4000, 2500, 3000, 1500)
)
# Attributable cases (aggregated)
results$health_main$impact_rounded
# Attributable cases (disaggregated)
results$health_detailed$results_raw |> dplyr::select(
geo_id_micro,
geo_id_macro,
impact_rounded
)
# Goal: determine attributable YLD (years lived with disability)
results <- attribute_health(
exp_central = 8.85,
prop_pop_exp = 1,
cutoff_central = 5,
bhd_central = 1000,
rr_central = 1.1,
rr_increment = 10,
erf_shape = "log_linear",
duration_central = 100,
dw_central = 1,
info = "pm2.5_yld"
)
results$health_main$impact
Attribute premature deaths or YLL to an environmental stressor using a life table approach
Description
This function assesses premature deaths or years of life lost (YLL) attributable to exposure to an environmental stressor using a life table approach.
Usage
attribute_lifetable(
age_group,
sex,
bhd_central,
bhd_lower = NULL,
bhd_upper = NULL,
population,
health_outcome = NULL,
min_age = NULL,
max_age = NULL,
approach_exposure = "single_year",
approach_newborns = "without_newborns",
year_of_analysis,
time_horizon = NULL,
exp_central = NULL,
exp_lower = NULL,
exp_upper = NULL,
cutoff_central = 0,
cutoff_lower = NULL,
cutoff_upper = NULL,
erf_eq_central = NULL,
erf_eq_lower = NULL,
erf_eq_upper = NULL,
rr_central = NULL,
rr_lower = NULL,
rr_upper = NULL,
rr_increment = NULL,
erf_shape = NULL,
prop_pop_exp = 1,
geo_id_micro = "a",
geo_id_macro = NULL,
info = NULL
)
Arguments
age_group |
|
sex |
|
bhd_central, bhd_lower, bhd_upper |
|
population |
|
health_outcome |
|
min_age, max_age |
|
approach_exposure |
|
approach_newborns |
|
year_of_analysis |
|
time_horizon |
|
exp_central, exp_lower, exp_upper |
|
cutoff_central, cutoff_lower, cutoff_upper |
|
erf_eq_central, erf_eq_lower, erf_eq_upper |
|
rr_central, rr_lower, rr_upper |
|
rr_increment |
|
erf_shape |
|
prop_pop_exp |
|
geo_id_micro, geo_id_macro |
|
info |
|
Details
Function arguments
age_group
The numeric values must refer to 1 year age groups, e.g. c(0:99).
To convert multi-year/larger age groups to 1 year age groups use the function prepare_lifetable()
(see its function documentation for more info).
bhd_central,bhd_lower,bhd_upper
Deaths per age must be inputted with 1 value per age (i.e. age group size = 1 year).
There must be greater than or equal to 1 deaths per age to avoid issues during the calculation of survival probabilities.
If zeros show up in the last ages (e.g. age 98 = 0 deaths, 99 years old = 1),
please sum the values and condensate last category (e.g. age 98 = 1).
population
The population data must be inputted with 1 value per age (i.e. age group size = 1 year).
The values must be greater than or equal to 1 per age to avoid issues during the calculation of survival probabilities.
Mid-year population of year x can be approximated as the mean of
either end-year populations of years x-1 and x or start-of-year populations of years x and x+1.
For each age, the inputted values must be greater than or equal to 1
to avoid issues during the calculation of survival probabilities.
approach_newborns
If "with_newborns" is selected, it is assumed that
for each year after the year of analysis n babies (population aged 0) are born.
time_horizon
Applicable for the following cases:
YLL:
single_yearorconstantexposurepremature deaths:
constantexposure
For example, if 10 is entered one is interested in the impacts of exposure
during the year of analysis and the next 9 years (= 10 years in total).
Default value: length of the numeric vector specified in the age_group argument.
min_age, max_age
The min_age default value 30 implies that all adults aged 30 or older
will be affected by the exposure;
max_age analogeously specifies the age above
which no health effects of the exposure are considered.
Methodology
The life table approach to obtain YLL and deaths requires population and baseline mortality data to be stratified by one year age groups. This function applies the same approach as the on applied in the WHO tool AirQ+ (WHO 2020), which is described in previous literature (Miller and Hurley 2003).
Detailed information about the methodology (including equations) is available in the package vignette. More specifically, see chapters:
Conversion of multi-year to single year age groups
To convert multi-year/larger age groups to 1 year age groups,
use the healthiar function prepare_lifetable().
Value
This function returns a list containing:
1) health_main (tibble) containing the main results;
-
impact(numericcolumn) attributable health burden/impact -
pop_fraction(numericcolumn) population attributable fraction; only applicable in relative risk assessments And many more
2) health_detailed (list) containing detailed (and interim) results.
-
input_args(list) containing all the argument inputs used in the background -
input_table(tibble) containing the inputs after preparation -
results_raw(tibble) containing results for all combinations of input (geo units, uncertainty, age and sex specific data...) -
results_by_...(tibble) containing results stratified by each geographic unit, age or sex.
Note
For this specific function, the return object health_detailed also
contains intermediate_calculations. This is a nested tibble
containing intermediate results, such as population projections and
impact by age/year.
Author(s)
Alberto Castro & Axel Luyten
References
Miller BG, Hurley JF (2003).
“Life table methods for quantitative impact assessments in chronic mortality.”
Journal of Epidemiology & Community Health, 57(3), 200–206.
ISSN 0143-005X, doi:10.1136/jech.57.3.200.
WHO (2020).
“Health impact assessment of air pollution: AirQ+ life table manual.”
World Health Organization - Regional Office for Europe.
https://www.who.int/europe/publications/i/item/WHO-EURO-2020-1559-41310-56212.
See Also
Upstream:
prepare_exposure(only if no exposure data available)Alternative:
attribute_health,get_paf,get_riskDownstream:
attribute_mod,compare,daly,multiexpose,standardize,monetize,socialize
Examples
# Goal: determine YLL attributable to air pollution exposure during one year
# using the life table approach
results <- attribute_lifetable(
health_outcome = "yll",
approach_exposure = "single_year",
approach_newborns = "without_newborns",
exp_central = 8.85,
prop_pop_exp = 1,
cutoff_central = 5,
rr_central = 1.118,
rr_increment = 10,
erf_shape = "log_linear",
age_group = exdat_lifetable$age_group,
sex = exdat_lifetable$sex,
bhd_central = exdat_lifetable$deaths,
population = exdat_lifetable$midyear_population,
year_of_analysis = 2019,
min_age = 20
)
results$health_main$impact # Attributable YLL
# Goal: determine attributable premature deaths due to air pollution exposure
# during one year using the life table approach
results_pm_deaths <- attribute_lifetable(
health_outcome = "deaths",
approach_exposure = "single_year",
exp_central = 8.85,
prop_pop_exp = 1,
cutoff_central = 5,
rr_central = 1.118,
rr_increment = 10,
erf_shape = "log_linear",
age_group = exdat_lifetable$age_group,
sex = exdat_lifetable$sex,
bhd_central = exdat_lifetable$deaths,
population = exdat_lifetable$midyear_population,
year_of_analysis = 2019,
min_age = 20
)
results_pm_deaths$health_main$impact # Attributable premature deaths
# Goal: determine YLL attributable to air pollution exposure (exposure distribution)
# during one year using the life table approach
results <- attribute_lifetable(
health_outcome = "yll",
exp_central = rep(c(8, 9, 10), each = 100*2), # each = length of sex or age_group vector
prop_pop_exp = rep(c(0.2, 0.3, 0.5), each = 100*2), # each = length of sex or age_group vector
cutoff_central = 5,
rr_central = 1.118,
rr_lower = 1.06,
rr_upper = 1.179,
rr_increment = 10,
erf_shape = "log_linear",
age_group = rep(
exdat_lifetable$age_group,
times = 3), # times = number of exposure categories
sex = rep(
exdat_lifetable$sex,
times = 3), # times = number of exposure categories
population = rep(
exdat_lifetable$midyear_population,
times = 3), # times = number of exposure categories
bhd_central = rep(
exdat_lifetable$deaths,
times = 3), # times = number of exposure categories
year_of_analysis = 2019,
min_age = 20
)
results$health_main$impact_rounded # Attributable YLL
Attributabe health impact to an environmental stressor
Description
This INTERNAL function calculates the health impacts, mortality or morbidity, of an environmental stressor using a single value for baseline heath data, i.e. without life table.
Usage
attribute_master(
approach_risk = NULL,
exp_central,
exp_lower = NULL,
exp_upper = NULL,
cutoff_central = NULL,
cutoff_lower = NULL,
cutoff_upper = NULL,
pop_exp = NULL,
erf_eq_central = NULL,
erf_eq_lower = NULL,
erf_eq_upper = NULL,
rr_central = NULL,
rr_lower = NULL,
rr_upper = NULL,
rr_increment = NULL,
erf_shape = NULL,
bhd_central = NULL,
bhd_lower = NULL,
bhd_upper = NULL,
prop_pop_exp = NULL,
geo_id_micro = NULL,
geo_id_macro = NULL,
age_group = "all",
sex = "all",
population = NULL,
info = NULL,
dw_central = NULL,
dw_lower = NULL,
dw_upper = NULL,
duration_central = NULL,
duration_lower = NULL,
duration_upper = NULL,
is_lifetable = NULL,
health_outcome = NULL,
min_age = NULL,
max_age = NULL,
approach_newborns = NULL,
approach_exposure = NULL,
year_of_analysis = NULL,
time_horizon = NULL,
input_args = NULL
)
Arguments
approach_risk |
|
exp_central, exp_lower, exp_upper |
|
cutoff_central, cutoff_lower, cutoff_upper |
|
pop_exp |
|
erf_eq_central, erf_eq_lower, erf_eq_upper |
|
rr_central, rr_lower, rr_upper |
|
rr_increment |
|
erf_shape |
|
bhd_central, bhd_lower, bhd_upper |
|
prop_pop_exp |
|
geo_id_micro, geo_id_macro |
|
age_group |
|
sex |
|
population |
|
info |
|
dw_central, dw_lower, dw_upper |
|
duration_central, duration_lower, duration_upper |
|
is_lifetable |
|
health_outcome |
|
min_age, max_age |
|
approach_newborns |
|
approach_exposure |
|
year_of_analysis |
|
time_horizon |
|
Value
This function returns a list containing:
1) health_main (tibble) containing the main results;
-
impact(numericcolumn) attributable health burden/impact -
pop_fraction(numericcolumn) population attributable fraction; only applicable in relative risk assessments And many more
2) health_detailed (list) containing detailed (and interim) results.
-
input_args(list) containing all the argument inputs used in the background -
input_table(tibble) containing the inputs after preparation -
results_raw(tibble) containing results for all combinations of input (geo units, uncertainty, age and sex specific data...) -
results_by_...(tibble) containing results stratified by each geographic unit, age or sex.
Author(s)
Alberto Castro & Axel Luyten
Create a scenario 2 by modifying an existing scenario 1 and determine attributable health impacts in it
Description
This function quantifies the attributable health impacts in a new scenario 2 as follows:
taking the input data of an existing scenario 1 (obtained using
attribute_health()),modifying some of these input data of scenario 1 for the scenario 2 and
calling in the background
attribute_health()with the new data for scenario 2
Usage
attribute_mod(
output_attribute,
erf_shape = NULL,
rr_central = NULL,
rr_lower = NULL,
rr_upper = NULL,
rr_increment = NULL,
erf_eq_central = NULL,
erf_eq_lower = NULL,
erf_eq_upper = NULL,
exp_central = NULL,
exp_lower = NULL,
exp_upper = NULL,
prop_pop_exp = NULL,
pop_exp = NULL,
cutoff_central = NULL,
cutoff_lower = NULL,
cutoff_upper = NULL,
bhd_central = NULL,
bhd_lower = NULL,
bhd_upper = NULL,
geo_id_micro = NULL,
geo_id_macro = NULL,
age_group = NULL,
sex = NULL,
population = NULL,
info = NULL,
min_age = NULL,
max_age = NULL,
approach_exposure = NULL,
approach_newborns = NULL,
year_of_analysis = NULL
)
Arguments
output_attribute |
|
erf_shape |
|
rr_central, rr_lower, rr_upper |
|
rr_increment |
|
erf_eq_central, erf_eq_lower, erf_eq_upper |
|
exp_central, exp_lower, exp_upper |
|
prop_pop_exp |
|
pop_exp |
|
cutoff_central, cutoff_lower, cutoff_upper |
|
bhd_central, bhd_lower, bhd_upper |
|
geo_id_micro, geo_id_macro |
|
age_group |
|
sex |
|
population |
|
info |
|
min_age, max_age |
|
approach_exposure |
|
approach_newborns |
|
year_of_analysis |
|
Details
Methodology
This function calls in the background attribute_health(), which can use
the relative risk (Murray et al. 2003) and absolute risk (WHO 2011).
Detailed information about the methodology (including equations) is available in the package vignette. More specifically, see chapters:
Value
This function returns a list containing:
1) health_main (tibble) containing the main results;
-
impact(numericcolumn) attributable health burden/impact -
pop_fraction(numericcolumn) population attributable fraction; only applicable in relative risk assessments And many more
2) health_detailed (list) containing detailed (and interim) results.
-
input_args(list) containing all the argument inputs used in the background -
input_table(tibble) containing the inputs after preparation -
results_raw(tibble) containing results for all combinations of input (geo units, uncertainty, age and sex specific data...) -
results_by_...(tibble) containing results stratified by each geographic unit, age or sex.
Author(s)
Alberto Castro & Axel Luyten
References
Murray CJ, Ezzati M, Lopez AD, Rodgers A, Hoorn SV (2003).
“Comparative risk assessment: conceptual framework and design.”
Epidemiology, 14(4), 447-458.
doi:10.1186/1478-7954-1-1.
WHO (2011).
“Burden of disease from environmental noise: Quantification of healthy life years lost in Europe.”
World Health Organization.
https://www.who.int/publications/i/item/burden-of-disease-from-environmental-noise-quantification-of-healthy-life-years-lost-in-europe.
See Also
Upstream:
attribute_health,attribute_lifetableDownstream:
compare
Examples
# Goal: adjust an existing healthiar scenario and determine the health
# impacts in the modified scenario
## First create a scenario to be modified
scenario_A <- attribute_health(
exp_central = 8.85, # EXPOSURE 1
cutoff_central = 5,
bhd_central = 25000,
approach_risk = "relative_risk",
erf_shape = "log_linear",
rr_central = 1.118,
rr_increment = 10
)
scenario_A$health_main$impact # Attributable impact in scenario A
## Modify scenario (adjust exposure value)
scenario_B <- attribute_mod(
output_attribute = scenario_A,
exp_central = 6 # EXPOSURE 2
)
scenario_B$health_main$impact # Attributable impact in scenario B
Cost-benefit analysis
Description
This function performs a cost-benefit analysis. It is assumed that the benefit is caused by the positive health impacts of a policy intervention, which generates some costs.
Usage
cba(
output_attribute = NULL,
impact_benefit = NULL,
valuation,
cost,
discount_rate_benefit = NULL,
discount_rate_cost = NULL,
inflation_rate = NULL,
discount_shape = "exponential",
n_years_benefit = 1,
n_years_cost = 1
)
Arguments
output_attribute |
|
impact_benefit |
|
valuation |
|
cost |
|
discount_rate_benefit, discount_rate_cost |
|
inflation_rate |
|
discount_shape |
|
n_years_benefit, n_years_cost |
|
Details
Methodology
This function provides as output three types of cost-benefit indicators (Boardman et al. 2018):
net benefit
cost-benefit ratio
return of investment
Detailed information about the methodology (including equations) is available in the package vignette. More specifically, see chapters:
Value
This function returns a list containing:
1) cba_main (tibble) containing the main CBA results;
-
net_benefit(numericcolumn) containing the difference between benefit and cost (i.e. benefit - cost) -
benefit(numericcolumn) containing discounted benefit (i.e. monetized attributable health impact) -
cost(numericcolumn) containing discounted cost And many more
2) cba_detailed (list) containing detailed (and interim) results.
-
benefit(list) -
cost(tibble)
If the argument output_attribute was specified, then the two results elements are added to the existing output.
Author(s)
Alberto Castro & Axel Luyten
References
Boardman AE, Greenberg DH, Vining AR, Weimer DL (2018). Cost-Benefit Analysis: Concepts and Practice, 5th edition. Cambridge University Press, Cambridge, UK. ISBN 978-1108401296.
See Also
Upstream:
attribute_healthAlternative:
monetize
Examples
# Goal: performs a cost-benefit analysis using an existing output
# of a attribute_... function
output_attribute <- attribute_health(
erf_shape = "log_linear",
rr_central = 1.369,
rr_increment = 10,
exp_central = 8.85,
cutoff_central = 5,
bhd_central = 30747
)
results <- cba(
output_attribute = output_attribute,
valuation = 50000,
cost = 100000000,
discount_shape = "exponential",
discount_rate_benefit = 0.03,
discount_rate_cost = 0.03,
n_years_benefit = 5,
n_years_cost = 5
)
results$cba_main |>
dplyr::select(benefit, cost, net_benefit)
Check if arguments are identical before stop
Description
This function checks if two different sets of arguments are identical
Usage
check_if_args_identical(args_a, args_b, names_to_check)
Arguments
args_a |
|
args_b |
|
names_to_check |
|
Author(s)
Alberto Castro & Axel Luyten
Collapse rows by grouping columns
Description
This function paste rows with different values and keep only unique rows following grouping columns
Usage
collapse_df_by_group(
df,
group_col_names,
multi_value_col_names = NULL,
ci_col_names = NULL,
only_unique_rows = TRUE
)
Arguments
df |
|
group_col_names |
|
multi_value_col_names |
|
ci_col_names |
|
only_unique_rows |
|
Value
This function returns a data frame or tibble with lower number rows after collapsing
Author(s)
Alberto Castro & Axel Luyten
Compare the attributable health impacts between two scenarios
Description
This function calculates the health impacts between two scenarios (e.g. before and after a intervention in a health impact assessments) using either the delta or pif approach.
Usage
compare(
output_attribute_scen_1,
output_attribute_scen_2,
approach_comparison = "delta"
)
Arguments
output_attribute_scen_1 |
Scenario 1 as in the output of attribute() |
output_attribute_scen_2 |
Scenario 2 as in the output of attribute() |
approach_comparison |
|
Details
Methodology This function compares the attributable health impacts in scenario 1 with scenario 2. It can use two approaches:
Delta: Subtraction of health impacts in the two scenarios (two PAF) (WHO Regional Office for Europe 2014)
Potential impact fraction (PIF): Single PIF for both scenarios (WHO 2003; Murray et al. 2003; Askari and Namayandeh 2020)
Detailed information about the methodology (including equations) is available in the package vignette. More specifically, see chapters:
Specifications of the comparison approach
Please, note that the PIF comparison approach assumes same baseline health data for scenario 1 and 2 (e.g. comparison of two scenarios at the same time point). With the delta comparison approach, the difference between two scenarios is obtained by subtraction. The delta approach is suited for all comparison cases, allowing a comparison of a situation now with a situation in the future.
IMPORTANT: If your aim is to quantify health impacts from a policy intervention, be aware that you should use the same year of analysis and therefore same health baseline data in both scenarios. The only variable that should change is the exposure (as a result of the intervention).
Comparing DALY
If you want to use compare() DALY with daly(),
do not enter the output of daly() in compare().
Instead, follow these steps:
1) use compare() for YLL and YLD separately
2) use daly() inserting the output of both compare()
Alternatively, you can use attribute_health
to quantify DALY entering DALY in the argument bhd_central
and then use compare()
Value
This function returns a list containing:
1) health_main (tibble) containing the main results from the comparison;
-
impact(numericcolumn) difference in attributable health burden/impact between scenario 1 and 2 -
impact_scen_1(numericcolumn) attributable health impact of scenario 1 -
impact_scen_2(numericcolumn) attributable health impact of scenario 2 And many more
2) health_detailed (list) containing detailed (and interim) results from the comparison.
-
results_raw(tibble) containing comparison results for each combination of input uncertainty for both scenario 1 and 2 -
results_by_geo_id_micro(tibble) containing comparison results for each geographic unit under analysis (specified ingeo_id_microargument) -
results_by_geo_id_macro(tibble) containing comparison results for each aggregated geographic unit under analysis (specified ingeo_id_macroargument)) -
input_table(list) containing the inputs to each relevant argument for both scenario 1 and 2 -
input_args(list) containing all the argument inputs for both scenario 1 and 2 used in the background -
scen_1(tibble) containing results for scenario 1 -
scen_2(tibble) containing results for scenario 2
Author(s)
Alberto Castro & Axel Luyten
References
Askari M, Namayandeh SM (2020).
“The Difference between the Population Attributable Risk (PAR) and the Potentioal Impact Fraction (PIF).”
Iranian Journal of Public Health, 49(10), 2018–2019.
doi:10.18502/ijph.v49i10.4713, https://pmc.ncbi.nlm.nih.gov/articles/PMC7719653/.
Murray CJL, Ezzati M, Lopez AD, Rodgers A, Vander Hoorn S (2003).
“Comparative quantification of health risks conceptual framework and methodological issues.”
Popul. Health Metr., 1(1), 1.
WHO Regional Office for Europe (2014).
WHO Expert Meeting: Methods and tools for assessing the health risks of air pollution at local, national and international level. Meeting report; 12-13 May 2014; Bonn, Germany.
WHO Regional Office for Europe, Copenhagen.
https://iris.who.int/handle/10665/142940.
WHO (2003).
“Introduction and methods: Assessing the environmental burden of disease at national and local levels.”
World Health Organization.
https://www.who.int/publications/i/item/9241546204.
See Also
Upstream:
attribute_health,attribute_mod,standardize,Downstream:
daly
Examples
# Goal: comparison of two scenarios with delta approach
scenario_A <- attribute_health(
exp_central = 8.85, # EXPOSURE 1
cutoff_central = 5,
bhd_central = 25000,
approach_risk = "relative_risk",
erf_shape = "log_linear",
rr_central = 1.118,
rr_increment = 10
)
scenario_B <- attribute_health(
exp_central = 6, # EXPOSURE 2
cutoff_central = 5,
bhd_central = 25000,
approach_risk = "relative_risk",
erf_shape = "log_linear",
rr_central = 1.118,
rr_increment = 10
)
results <- compare(
approach_comparison = "delta",
output_attribute_scen_1 = scenario_A,
output_attribute_scen_2 = scenario_B
)
# Inspect the difference, stored in the \code{impact} column
results$health_main |>
dplyr::select(impact, impact_scen_1, impact_scen_2) |>
print()
# Goal: comparison of two scenarios with potential impact fraction (pif) approach
output_attribute_scen_1 <- attribute_health(
exp_central = 8.85, # EXPOSURE 1
cutoff_central = 5,
bhd_central = 25000,
approach_risk = "relative_risk",
erf_shape = "log_linear",
rr_central = 1.118, rr_lower = 1.060, rr_upper = 1.179,
rr_increment = 10
)
output_attribute_scen_2 <- attribute_health(
exp_central = 6, # EXPOSURE 2
cutoff_central = 5,
bhd_central = 25000,
approach_risk = "relative_risk",
erf_shape = "log_linear",
rr_central = 1.118, rr_lower = 1.060, rr_upper = 1.179,
rr_increment = 10
)
results <- compare(
output_attribute_scen_1 = output_attribute_scen_1,
output_attribute_scen_2 = output_attribute_scen_2,
approach_comparison = "pif"
)
# Inspect the difference, stored in the impact column
results$health_main$impact
Compile input
Description
This function compiles the input data of the main function and calculates the population attributable fraction based on the input data (all in one data frame)
Usage
compile_input(input_args, is_lifetable)
Arguments
input_args |
|
is_lifetable |
|
Value
This function returns a data.frame with all input data together
Moreover, the data frame includes columns such as:
Attributable fraction
Health impact
Outcome metric
And many more.
Author(s)
Alberto Castro & Axel Luyten
Attributable disability-adjusted life years
Description
This function quantifies the attributable disability-adjusted life years (DALY) by summing the two DALY components: years of life lost (YLL) and years lived with disability (YLD).
Usage
daly(output_attribute_yll, output_attribute_yld)
Arguments
output_attribute_yll, output_attribute_yld |
|
Details
Methodology
This function sums the years of life lost (YLL) and years lived with disability (YLD) to obtain the disability-adjusted lost years (DALY) (GBD 2019 Risk Factors Collaborators 2020).
Detailed information about the methodology (including equations) is available in the package vignette. More specifically, see chapters:
Value
This function returns a list containing:
1) health_main (tibble) containing the main results;
-
impact(numericcolumn) attributable health burden/impact in DALY -
impact_yld(numericcolumn) attributable health burden/impact in YLD -
impact_yll(numericcolumn) attributable health burden/impact in YLL -
dw(numericcolumn) disability weight used for YLD calculation And many more
2) health_detailed (list) containing detailed (and interim) results.
-
results_raw(tibble) containing results for each combination of input uncertainty -
results_by_geo_id_micro(tibble) containing results for each geographic unit under analysis (specified ingeo_id_microargument) -
input_args(list) containing all the argument inputs used in the background
Author(s)
Alberto Castro & Axel Luyten
References
GBD 2019 Risk Factors Collaborators (2020). “Global burden of 87 risk factors in 204 countries and territories, 1990–2019.” The Lancet. doi:10.1016/S0140-6736(20)30752-2.
See Also
Upstream:
attribute_health,attribute_lifetable
Examples
# Goal: obtain DALY (disability-adjusted life years) from two existing \code{attribute_...} outputs
# Step 1: Create YLL (years of life lost) assessment
results_yll <- attribute_lifetable(
health_outcome = "yll",
approach_exposure = "single_year",
approach_newborns = "without_newborns",
exp_central = 8.85,
prop_pop_exp = 1,
cutoff_central = 5,
rr_central = 1.118,
rr_increment = 10,
erf_shape = "log_linear",
age_group = exdat_lifetable$age_group,
sex = exdat_lifetable$sex,
bhd_central = exdat_lifetable$deaths,
population = exdat_lifetable$midyear_population,
year_of_analysis = 2019,
min_age = 20
)
# Step 2: Create YLD (years lived with disability) assessment
results_yld <- attribute_health(
exp_central = 8.85,
prop_pop_exp = 1,
cutoff_central = 5,
bhd_central = 1000,
rr_central = 1.1,
rr_increment = 10,
erf_shape = "log_linear",
duration_central = 100,
dw_central = 0.5,
info = "pm2.5_yld"
)
# Step 3: obtain DALY
results <- daly(
output_attribute_yll = results_yll,
output_attribute_yld = results_yld
)
# Attributable impact in DALY
results$health_main |>
dplyr::select(impact, impact_yll, impact_yld)
Discount health impacts
Description
This function calculates discounted health impacts (without valuation).
Usage
discount(
output_attribute = NULL,
impact = NULL,
discount_rate = NULL,
n_years = NULL,
discount_shape = NULL,
inflation_rate = NULL
)
Arguments
output_attribute |
|
impact |
|
discount_rate |
|
n_years |
|
discount_shape |
|
inflation_rate |
|
Details
Methodology
This function applies a discount (Frederick et al. 2002; Harvey 1986; Mazur 1987), optionally with inflation (Brealey et al. 2023), to attributable health impacts into the future.
From an epidemiological perspective, the attributable health impacts cannot be discounted (or inflated), only economic costs/benefits can. However, in some economic analyses the attributable health impacts are discounted (and/or inflated) as a previous step to valuating them. For this specific purpose, this function is offered.
Detailed information about the methodology (including equations) is available in the package vignette. More specifically, see chapters:
Value
This function returns a list containing:
1) monetization_main (tibble) containing the main monetized results;
-
monetized_impact(numericcolumn) -
discount_factor(numericcolumn) calculated based on the entereddiscount_rate And many more
2) monetization_detailed (list) containing detailed (and interim) results.
-
results_by_year(tibble) -
health_raw(tibble) containing the monetized results for each for each combination of input uncertainty that were provided to the initialattribute_health()call
If the argument output_attribute was specified, then the two results elements are added to the existing output.
Author(s)
Alberto Castro & Axel Luyten
References
Brealey RA, Myers SC, Allen F, Benninga S, Read J (2023).
Principles of Corporate Finance, 14th edition.
McGraw-Hill Education, New York, NY.
ISBN 978-1264117464.
Frederick S, Loewenstein G, O'Donoghue T (2002).
“Time Discounting and Time Preference: A Critical Review.”
Journal of Economic Literature, 40(2), 351–401.
doi:10.1257/002205102320161311.
Harvey CM (1986).
“Value Functions for Infinite-Period Planning.”
Management Science, 32(9), 1123–1139.
doi:10.1287/mnsc.32.9.1123.
Mazur JE (1987).
“An adjusting procedure for studying delayed reinforcement.”
In Commons ML, Mazur JE, Nevin JA, Rachlin H (eds.), Quantitative Analyses of Behavior: Volume V. The Effect of Delay and of Intervening Events on Reinforcement Value, 55–73.
Lawrence Erlbaum Associates, Hillsdale, NJ.
ISBN 0-89859-800-1.
See Also
Upstream:
attribute_health,attribute_healthAlternative:
monetize
Examples
# Goal: discount attributable health impacts
results <- discount(
impact = 20000,
discount_shape = "exponential",
discount_rate = 0.03,
n_years = 20
)
results$monetization_main$monetized_impact
PM2.5 exposure and COPD incidence in Switzerland
Description
This tibble contains PM2.5 exposure and COPD incidence data from Switzerland.
Usage
data(exdat_cantons)
Format
exdat_cantons
- year
year
- canton
abbreviation of Swiss cantons
- lung_cancer_incidence
lung cancer incidence
- exposure
mean country-wide population-weighted exposure level
- pollutant
PM2.5
- exposure_type
exposure type
- population
number of inhabitants per canton
- rr
central relative risk estimate
- rr_l
lower 95% confidence interval bound of the relative risk estimate
- rr_u
upper 95% confidence interval bound of the relative risk estimate
- increment
exposure increment in
\mu g/m^3for which the relative risk estimates are valid- function_shape
shape of the exposure-response function
- cutoff
cutoff level below which no health effects are attributable to the exposure
- language_main
language spoken by the majority of inhabitants in the canton
- canton_long
full (English) name of the canton
Author(s)
Alberto Castro & Axel Luyten
Source
Real-world data
Population data per age and sex in Switzerland
Description
This tibble contains population per age and sex for Switzerland.
Usage
data(exdat_lifetable)
Format
exdat_lifetable
- age_group
single year age groups
- sex
female or male
- midyear_population
mid-year populations
- deaths
annual deaths
Author(s)
Alberto Castro & Axel Luyten
Source
Real-world data
Noise exposure in urban and rural regions in Norway
Description
This tibble contains noise exposure data from urban and rural regions in Norway.
Usage
data(exdat_noise)
Format
exdat_noise
- exposure_category
noise exposure range of the exposure category
- exposure_mean
mean noise exposure in the exposure category
- region
region for which exposure is valid
- exposed
number of exposed persons
Author(s)
Anette Kocbach Bolling & Vázquez Fernández
Source
Real-world data
PM2.5 exposure and COPD incidence in Switzerland
Description
This tibble contains modelled ozone (O_3) exposure and chronic obstructive pulmonary disease (COPD) incidence data from the Germany in 2016.
Usage
data(exdat_ozone)
Format
exdat_ozone
- pollutant
O_3- exposure
mean exposure level in the exposure category
- exp_unit
unit of the exposure
- proportion_population_exposed
proportion of the total population exposed to each exposure category
- mortality_copd_tota_yearl
mortality due to chronic obstructive pulmonary disease (ICD-10 J40-44)
- rr_central
central relative risk estimate
- rr_lower
lower 95% confidence interval bound of the relative risk estimate
- rr_upper
upper 95% confidence interval bound of the relative risk estimate
- rr_increment
exposure increment in
\mu g/m^3for which the relative risk estimates are valid- cutoff
cutoff level below which no health effects are attributable to the exposure
- erf_shape
shape of the exposure-response function
- exposure_type
exposure type
- rr_source
source of the relative risk estimates
- country
country
- year
year of the data
Author(s)
Alberto Castro & Axel Luyten
Source
Real-world data
PM2.5 exposure and COPD incidence in Switzerland
Description
This tibble contains PM2.5 exposure and COPD incidence data from Switzerland.
Usage
data(exdat_pm)
Format
exdat_pm
- year_of_analysis
year that the exposure and incidence data is from
- mean_concentration
population-weighted annual mean concentration
- relative_risk
central relative risk estimate
- relative_risk_lower
lower 95% confidence interval bound of the relative risk estimate
- relative_risk_upper
upper 95% confidence interval bound of the relative risk estimate
- erf_shape
shape of the exposure-response function
- incidence
COPD incidence in the year of analysis
- cutoff_value
cut-off value
- rr_increment
exposure increment in
\mu g/m^3for which the relative risk estimates are valid- rr_source
source of the relative risk
- rr_doi
DOI linking to the publication from which the relative risk was taken
Author(s)
Alberto Castro & Axel Luyten
Source
Real-world data
Social indicators of the BEST-COST Multidimensional Deprivation Index (MDI)
Description
This tibble contains social indicators of the BEST-COST Multidimensional Deprivation Index (MDI) of geo units in Belgium.
Usage
data(exdat_prepare_mdi)
Format
exdat_prepare_mdi
- id
id of the geographic unit
- geo_name
name of the geographic unit
- edu, unemployed, single_parent, no_heating, pop_change
single social indicators that make up the MDI
- norm_...
normalized single social indicators of the MDI
- MDI
BEST-COST Multidimensional Deprivation Index (MDI)
- MDI_decile
decile of the MDI rankig
- MDI_quartile
quartile of the MDI ranking
Author(s)
Arno Pauwels & Vanessa Gorasso
Source
Real-world data
Air pollution expsoure data of the Brussels-Capital region (Belgium)
Description
The data can be loaded using
exdat_pwm_1 <- terra::rast(
system.file("extdata", "exdat_pwm_1.tif", package = "healthiar")
)
(see Examples section below).
When loaded it is a variable of class SpatRaster, which contains air pollution exposure levels
of municipalities in the Brussels-Capital region (Belgium).
Because it is a .tif file it is stored in the package's inst/extdata directory.
Format
GeoTIFF raster
Author(s)
Arno Pauwels
Source
Real-world data
Examples
path <- system.file("extdata", "exdat_pwm_1.tif", package = "healthiar")
exdat_pwm_1 <- terra::rast(path)
Geospatial outlines and populations of the Brussels-Capital region (Belgium)
Description
This variable of class sf and data.frame contains the geospatial outlines and populations of
municipalities in the Brussels-Capital region (Belgium).
Usage
data(exdat_pwm_2)
Format
exdat_pwm_2
- code
NIS-codes (i.e. unique statistical code assigned to each geographic area in Belgium)
- name
Dutch names of the municipalities
- population
municipality populations
- region
geographic position of each municipality (North, East, West, South) relative to Brussels (Center)
- geom
geospatial outlines of the municipalities (MULTIPOLYGON)
Author(s)
Arno Pauwels
Source
Real-world data
Municipalities in Belgium ranked by BEST-COST Multidimensional Deprivation Index (MDI)
Description
This tibble contains data for municipalities in Belgium ranked by BEST-COST Multidimensional Deprivation Index (MDI).
Usage
data(exdat_socialize)
Format
exdat_socialize
- CS01012020
unique identifier of the geographic unit
- NUTS1
NUTS1 region tag
- PM25_MEAN
mean PM2.5 exposure
- RR
relative risk estimate from the literature
- score
BEST-COST Multidimensional Deprivation Index (MDI)
- rank
rank of the observation based on column score; note that the rank is not continuous, as some observations are missing
- deciles
deciles of the geo units based on the MDI
- POPULATION_below_40
(fake) populations up until and including 39 years of age
- POPULATION_40_plus
(fake) populations from 40 years of age onwards
- MORTALITY_below_40
(fake) mortality up until and including 39 years of age
- MORTALITY_40_plus
(fake) mortality from 40 years of age onwards
Author(s)
Arno Pauwels & Vanessa Gorasso
Source
Real-world data combined with fake population and mortality data
Find joining columns
Description
This function finds columns in two data frames that have same name and identical values (excluding exceptions).- The resulting joining columns are used to dplyr::x_join data frames and add the vector to by=.
Usage
find_joining_columns(df_1, df_2, except = NULL)
Arguments
df_1 |
First |
df_2 |
Second |
except |
|
Value
This function returns a vector of strings
Author(s)
Alberto Castro & Axel Luyten
Find columns with multiple values
Description
This function find data frame or tibble column names with different values in their rows (i.e. not a unique value)
Usage
find_multi_value_col_names(df, group_col_names = NULL)
Arguments
df |
|
group_col_names |
|
Value
This function returns a string vector with the names of the columns with multiple values
Author(s)
Alberto Castro & Axel Luyten
Get discount factor
Description
This function calculates the discount factor based on discount rate. If the argument inflation_rate is NULL (default), it is assumed that the discount rate is already corrected for inflation). Otherwise (if a value for inflation_rate is entered), the resulted discount factor is adjusted for inflation.
Usage
get_discount_factor(
discount_rate,
n_years,
discount_shape = "exponential",
inflation_rate = NULL
)
Arguments
discount_rate |
|
n_years |
|
discount_shape |
|
inflation_rate |
|
Details
Methodology
This function is called inside monetize().
One of the following three discount shapes can be selected:
Exponential (Frederick et al. 2002)
Hyperbolic as Harvey (1986)
Hyperbolic as Mazur (1987)
Detailed information about the methodology (including equations) is available in the package vignette. More specifically, see chapters:
Value
This function returns the numeric discount factor.
Author(s)
Alberto Castro & Axel Luyten
References
Frederick S, Loewenstein G, O'Donoghue T (2002).
“Time Discounting and Time Preference: A Critical Review.”
Journal of Economic Literature, 40(2), 351–401.
doi:10.1257/002205102320161311.
Harvey CM (1986).
“Value Functions for Infinite-Period Planning.”
Management Science, 32(9), 1123–1139.
doi:10.1287/mnsc.32.9.1123.
Mazur JE (1987).
“An adjusting procedure for studying delayed reinforcement.”
In Commons ML, Mazur JE, Nevin JA, Rachlin H (eds.), Quantitative Analyses of Behavior: Volume V. The Effect of Delay and of Intervening Events on Reinforcement Value, 55–73.
Lawrence Erlbaum Associates, Hillsdale, NJ.
ISBN 0-89859-800-1.
See Also
Alternative:
monetize
Examples
get_discount_factor(
discount_rate = 0.07,
n_years = 5
)
Attributable health cases based on relative risk
Description
This function calculates the health impacts for each uncertainty and geo area.
Usage
get_impact(input_table, pop_fraction_type)
Arguments
input_table |
|
Value
TBD. E.g. This function returns a data.frame with one row for each value of the
concentration-response function (i.e. central, lower and upper bound confidence interval.
Moreover, the data frame includes columns such as:
Attributable fraction
Health impact
Outcome metric
And many more.
Author(s)
Alberto Castro & Axel Luyten
Get population impact over time
Description
Get population impact over time
Usage
get_impact_with_lifetable(input_with_risk_and_pop_fraction)
Arguments
input_with_risk_and_pop_fraction |
|
Value
This function returns a data.frame with one row for each value of the
concentration-response function (i.e. central estimate, lower and upper bound confidence interval).
Moreover, the data frame include columns such as:
Attributable fraction
Health impact
Outcome metric
And many more.
Author(s)
Alberto Castro & Axel Luyten
Get inflation factor
Description
This function calculates the inflation factor based on inflation rate.
Usage
get_inflation_factor(n_years, inflation_rate = NULL)
Arguments
n_years |
|
inflation_rate |
|
Details
Methodology
This function is called inside monetize().
It calculates the inflation factor based on the inflation rate and the number of years into the future as described in Brealey et al. (2023).
Detailed information about the methodology (including equations) is available in the package vignette. More specifically, see chapters:
Value
This function returns the numeric inflation factor.
Author(s)
Alberto Castro & Axel Luyten
References
Brealey RA, Myers SC, Allen F, Benninga S, Read J (2023). Principles of Corporate Finance, 14th edition. McGraw-Hill Education, New York, NY. ISBN 978-1264117464.
See Also
Alternative:
monetize
Examples
get_inflation_factor(
inflation_rate = 0.02,
n_years = 5
)
get_input_args
Description
This function compiles the input data of the main function and calculates the population attributable fraction based on the input data (all in one data frame)
Usage
get_input_args(environment, call)
Value
This function returns a list with all input data together by argument
Author(s)
Alberto Castro & Axel Luyten
Obtain and store output
Description
This function distributes and store outputs by level of detail by aggregating or filtering impacts.
Usage
get_output(
input_args = NULL,
input_table = NULL,
intermediate_calculations = NULL,
results_raw
)
Arguments
input_args |
|
input_table |
|
intermediate_calculations |
|
results_raw |
|
Value
TBD. E.g. This function returns a data.frame with one row for each value of the
concentration-response function (i.e. central, lower and upper bound confidence interval.
Moreover, the data frame includes columns such as:
Attributable fraction
Health impact
Outcome metric
And many more.
Author(s)
Alberto Castro & Axel Luyten
Get population attributable fraction
Description
This function calculates the population attributable fraction (PAF) of a health outcome due to exposure to an environmental stressor
Usage
get_paf(rr_at_exp, prop_pop_exp)
Arguments
rr_at_exp |
|
prop_pop_exp |
|
Details
Methodology
This function is called internally inside other healthiar functions, e.g. attribute_health().
The function calculates the population attributable fraction
(i.e. the percent of health cases that are attributable to the exposure)
based on the relative risk as described in the extensive existing literature
(WHO 2003; Steenland and Armstrong 2006; Lehtomäki et al. 2025).
Detailed information about the methodology (including equations) is available in the package vignette. More specifically, see chapters:
Value
This function returns the population attributable fraction as a numeric value.
Author(s)
Alberto Castro & Axel Luyten
References
Lehtomäki H, Aasvang GM, Sulo G, Denby BR, Hänninen OO, Brauer M, Pereira G, Dadras O, Bølling AK (2025).
“Burden of disease attributable to PM2.5 at low exposure levels: impact of methodological choices.”
Environmental Health, 25(1), 4.
ISSN 1476-069X, doi:10.1186/s12940-025-01250-y.
Steenland K, Armstrong B (2006).
“An overview of methods for calculating the burden of disease due to specific risk factors.”
Epidemiology, 17(5), 512–519.
doi:10.1097/01.ede.0000229155.05644.43.
WHO (2003).
“Introduction and methods: Assessing the environmental burden of disease at national and local levels.”
World Health Organization.
https://www.who.int/publications/i/item/9241546204.
See Also
Alternative:
attribute_health,attribute_lifetable
Examples
# Goal: calculate PAF based on RR and the proportion of population exposed
get_paf(rr = 1.062, prop_pop_exp = 1)
Get potential impact fraction (PIF)
Description
This function calculates the potential impact fraction of a health outcome due to exposure to an environmental stressor
Usage
get_pif(rr_at_exp_1, rr_at_exp_2, prop_pop_exp_1, prop_pop_exp_2)
Arguments
rr_at_exp_1 |
|
rr_at_exp_2 |
|
prop_pop_exp_1 |
|
prop_pop_exp_2 |
|
Details
Methodology
This function is internally used inside the healthiar function compare().
The potential impact fraction (PIF) is calculated as
described in WHO (2003),
Murray et al. (2003) and
Askari and Namayandeh (2020).
Detailed information about the methodology (including equations) is available in the package vignette. More specifically, see chapters:
Value
This function returns the potential impact fraction as a numeric value.
Author(s)
Alberto Castro & Axel Luyten
References
Askari M, Namayandeh SM (2020).
“The Difference between the Population Attributable Risk (PAR) and the Potentioal Impact Fraction (PIF).”
Iranian Journal of Public Health, 49(10), 2018–2019.
doi:10.18502/ijph.v49i10.4713, https://pmc.ncbi.nlm.nih.gov/articles/PMC7719653/.
Murray CJL, Ezzati M, Lopez AD, Rodgers A, Vander Hoorn S (2003).
“Comparative quantification of health risks conceptual framework and methodological issues.”
Popul. Health Metr., 1(1), 1.
WHO (2003).
“Introduction and methods: Assessing the environmental burden of disease at national and local levels.”
World Health Organization.
https://www.who.int/publications/i/item/9241546204.
See Also
Alternative:
compare
Examples
# Goal: calculate the potential impact fraction (PIF)
results <- get_pif(
rr_at_exp_1 = 1.043879,
rr_at_exp_2 = 1.011217,
prop_pop_exp_1 = 1,
prop_pop_exp_2 = 1
)
print(results)
Get population attributable or impact fraction
Description
This function calculates the population attributable fraction or potential impact fraction of a health outcome due to exposure to an environmental stressor
Usage
get_pop_fraction(rr_at_exp_1, rr_at_exp_2, prop_pop_exp_1, prop_pop_exp_2)
Arguments
rr_at_exp_1 |
|
rr_at_exp_2 |
|
prop_pop_exp_1 |
|
prop_pop_exp_2 |
|
Details
For more information about the equations used please see the function documentation of attribute_health.
Value
This function returns a value corresponding to the population attributable fraction
Author(s)
Alberto Castro & Axel Luyten
Calculates reference proportion of population
Description
This function calculates reference proportion of population. To be used in socialize() and standardize() in case that ref_prop_pop is not provided.
Usage
get_ref_prop_pop(df)
Arguments
df |
|
Value
A tibble with the columns
-
age_groupcontainingnumericage values -
ref_prop_popcontainingnumericvalues
Author(s)
Alberto Castro & Axel Luyten
Get the relative risk of an exposure level
Description
This function re-scales the relative risk from the increment value in the epidemiological study (e.g. for PM2.5 10 or 5 ug/m3) to the actual population exposure
Usage
get_risk(
erf_shape = NULL,
rr = NULL,
rr_increment = NULL,
erf_eq = NULL,
cutoff = 0,
exp
)
Arguments
erf_shape |
|
rr |
|
rr_increment |
|
erf_eq |
|
cutoff |
|
exp |
|
Details
Function arguments
erf_eq
If the function is provided as string,
it can only contain the variable c (exposure), e.g. "3+c+c^2".
If the function is provided as a function,
the object must be of the class function.
If only the values of the x-axis (exposure) and y axis (relative risk)
of the dots in the exposure-response function are available,
a cubic spline natural interpolation can be assumed to get the function using,
e.g., stats::splinefun(x, y, method="natural")
Methodology
This function is called internally inside other healthiar functions, e.g. attribute_health().
The function calculates the relative risk at the exposure level based on the
relative risk available in the epidemiological literature and the assumed shape
of the exposure-response function
(Pozzer et al. 2023; Lehtomäki et al. 2025).
Detailed information about the methodology (including corresponding equations and literature) is available in the package vignette. More specifically, see chapters:
Value
This function returns the numeric risk value(s) at the specified exposure level(s), referred to as rr_at_exp in the relative risk equations above.
Author(s)
Alberto Castro & Axel Luyten
References
Lehtomäki H, Aasvang GM, Sulo G, Denby BR, Hänninen OO, Brauer M, Pereira G, Dadras O, Bølling AK (2025).
“Burden of disease attributable to PM2.5 at low exposure levels: impact of methodological choices.”
Environmental Health, 25(1), 4.
ISSN 1476-069X, doi:10.1186/s12940-025-01250-y.
Pozzer A, Anenberg SC, Dey S, Haines A, Lelieveld J, Chowdhury S (2023).
“Mortality Attributable to Ambient Air Pollution: A Review of Global Estimates.”
GeoHealth, 7(1), e2022GH000711.
doi:10.1029/2022GH000711, e2022GH000711 2022GH000711, https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1029/2022GH000711, https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2022GH000711.
See Also
Alternative:
attribute_health,attribute_lifetable
Examples
# Goal: scale relative risk to observed exposure level
get_risk(
rr = 1.05,
rr_increment = 10,
erf_shape = "linear",
exp = 10,
cutoff = 5
)
# Goal: determine the absolute risk for high annoyance at specific noise exposure levels
get_risk(
erf_eq = "78.9270-3.1162*c+0.0342*c^2",
exp = c(57.5, 62.5, 67.5, 72.5, 77.5)
)
# Goal: attribute COPD cases to air pollution exposure
# by applying a user-defined exposure response function,
# e.g. MR-BRT curves from Global Burden of Disease study.
get_risk(
erf_eq = splinefun(
x = c(0, 5, 10, 15, 20, 25, 30, 50, 70, 90, 110),
y = c(1.00, 1.04, 1.08, 1.12, 1.16, 1.20, 1.23, 1.35, 1.45, 1.53, 1.60),
method = "natural"),
exp = c(8, 9, 10)
)
Get input data and PAF
Description
This function calculates the population attributable fraction (PAF) based on the input data and puts the results in additional columns joined to the input data frame.
Usage
get_risk_and_pop_fraction(input_table, pop_fraction_type)
Arguments
input_table |
|
pop_fraction_type |
|
Value
This function returns a data.frame with the input data adding a column for the population attributable fraction
Moreover, the data frame includes columns such as:
Attributable fraction
Health impact
Outcome metric
And many more.
Author(s)
Alberto Castro & Axel Luyten
Monetize health impacts
Description
This function monetizes health impacts
Usage
monetize(
output_attribute = NULL,
impact = NULL,
valuation,
discount_rate = NULL,
discount_shape = "exponential",
n_years = NULL,
inflation_rate = NULL,
info = NULL
)
Arguments
output_attribute |
|
impact |
|
valuation |
|
discount_rate |
|
discount_shape |
|
n_years |
|
inflation_rate |
|
info |
|
Details
Methodology
This function monetize health impacts valuating them and applying discounting (Frederick et al. 2002; Harvey 1986; Mazur 1987) and/or inflation (Brealey et al. 2023).
One of the following three discount shapes can be selected:
Exponential (Frederick et al. 2002)
Hyperbolic as Harvey (1986)
Hyperbolic as Mazur (1987)
Detailed information about the methodology (including equations) is available in the package vignette. More specifically, see chapters:
Value
This function returns a list containing:
1) monetization_main (tibble) containing the main monetized results;
-
monetized_impact(numericcolumn) -
discount_factor(numericcolumn) calculated based on the entereddiscount_rate And many more
2) monetization_detailed (list) containing detailed (and interim) results.
-
results_by_year(tibble) -
health_raw(tibble) containing the monetized results for each for each combination of input uncertainty that were provided to the initialattribute_health()call
If the argument output_attribute was specified, then the two results elements are added to the existing output.
Author(s)
Alberto Castro & Axel Luyten
References
Brealey RA, Myers SC, Allen F, Benninga S, Read J (2023).
Principles of Corporate Finance, 14th edition.
McGraw-Hill Education, New York, NY.
ISBN 978-1264117464.
Frederick S, Loewenstein G, O'Donoghue T (2002).
“Time Discounting and Time Preference: A Critical Review.”
Journal of Economic Literature, 40(2), 351–401.
doi:10.1257/002205102320161311.
Harvey CM (1986).
“Value Functions for Infinite-Period Planning.”
Management Science, 32(9), 1123–1139.
doi:10.1287/mnsc.32.9.1123.
Mazur JE (1987).
“An adjusting procedure for studying delayed reinforcement.”
In Commons ML, Mazur JE, Nevin JA, Rachlin H (eds.), Quantitative Analyses of Behavior: Volume V. The Effect of Delay and of Intervening Events on Reinforcement Value, 55–73.
Lawrence Erlbaum Associates, Hillsdale, NJ.
ISBN 0-89859-800-1.
See Also
Upstream:
attribute_health,attribute_lifetable,compareAlternative:
get_inflation_factor,get_discount_factor,cba
Examples
# Goal: monetize the attributable impacts of an existing healthiar
# assessment
output_attribute <- attribute_health(
erf_shape = "log_linear",
rr_central = exdat_pm$relative_risk,
rr_increment = 10,
exp_central = exdat_pm$mean_concentration,
cutoff_central = exdat_pm$cut_off_value,
bhd_central = exdat_pm$incidence
)
results <- monetize(
output_attribute = output_attribute,
discount_shape = "exponential",
discount_rate = 0.03,
n_years = 5,
valuation = 50000 # E.g. EURO
)
# Attributable COPD cases its monetized impact
results$monetization_main |>
dplyr::select(impact, monetized_impact)
Aggregate health impacts from multiple exposures
Description
This function aggregates health impacts from multiple exposures to environmental stressors.
Usage
multiexpose(
output_attribute_exp_1,
output_attribute_exp_2,
exp_name_1,
exp_name_2,
approach_multiexposure = "additive"
)
Arguments
output_attribute_exp_1, output_attribute_exp_2 |
Output of attribute() for exposure 1 and 2, respectively. Baseline health data and population must be identical in outputs 1 and 2. |
exp_name_1, exp_name_2 |
|
approach_multiexposure |
|
Details
Methodology
This function can add up the attributable health impacts from correlated exposures applying one of the following methods (Strak et al. 2024):
Additive (Steenland and Armstrong 2006)
Multiplicative (Jerrett et al. 2013)
Combined (Steenland and Armstrong 2006)
Detailed information about the methodology (including equations) is available in the package vignette. More specifically, see chapters:
Value
This function returns a list containing:
1) health_main (tibble) containing the main results;
-
impact(numericcolumn) attributable health burden/impact -
pop_fraction(numericcolumn) population attributable fraction; only applicable in relative risk assessments And many more
2) health_detailed (list) containing detailed (and interim) results.
-
input_args(list) containing all the argument inputs used in the background -
input_table(tibble) containing the inputs after preparation -
results_raw(tibble) containing results for all combinations of input (geo units, uncertainty, age and sex specific data...) -
results_by_...(tibble) containing results stratified by each geographic unit, age or sex.
Author(s)
Alberto Castro & Axel Luyten
References
Jerrett M, Burnett RT, Beckerman BS, Turner MC, Krewski D, Thurston G, Martin RV, van Donkelaar A, Hughes E, Shi Y, Gapstur SM, Thun MJ, Pope 3CA (2013).
“Spatial analysis of air pollution and mortality in California.”
American Journal of Respiratory and Critical Care Medicine, 188(5), 593–599.
doi:10.1164/rccm.201303-0609OC.
Steenland K, Armstrong B (2006).
“An overview of methods for calculating the burden of disease due to specific risk factors.”
Epidemiology, 17(5), 512–519.
doi:10.1097/01.ede.0000229155.05644.43.
Strak M, Houthuijs D, Staatsen B (2024).
“D1.2 Report on the methodology for assessing the burden of correlated exposures.”
EU Project BEST-COST.
See Also
Upstream:
attribute_health,attribute_lifetable
Examples
# Goal: determine aggregated health impacts from multiple exposures
# Step 1: create assessment with exposure 1
output_attribute_exp_1 <- attribute_health(
erf_shape = "log_linear",
rr_central = 1.369,
rr_increment = 10,
exp_central = 8.85,
cutoff_central = 5,
bhd_central = 30747
)
output_attribute_exp_1$health_main$impact
# Step 2: create assessment with exposure 2
output_attribute_exp_2 <- attribute_mod(
output_attribute = output_attribute_exp_1,
exp_central = 10.9,
rr_central = 1.031
)
output_attribute_exp_2$health_main$impact
# Step 3: aggregate impacts of the two assessments
results <- multiexpose(
output_attribute_exp_1 = output_attribute_exp_1,
output_attribute_exp_2 = output_attribute_exp_2,
exp_name_1 = "pm2.5",
exp_name_2 = "no2",
approach_multiexposure = "multiplicative"
)
results$health_main$impact
Prepare exposure data
Description
This function prepares tabular population exposure data compatible with the attribute() and compare() functions,
based on gridded pollution concentration data and polygon data representing geographic units.
If population data is provided, the function calculates an average concentration value in each geographic unit
that is weighted with the population number at each location.
If no population data is provided, the function calculates the simple spatial average concentration in each geographic unit.
Usage
prepare_exposure(
poll_grid,
geo_units,
population = NULL,
pop_grid = NULL,
geo_id_micro = NULL,
geo_id_macro = NULL,
bin_width = 0.1
)
Arguments
poll_grid |
|
geo_units |
|
population |
|
pop_grid |
|
geo_id_micro |
|
geo_id_macro |
|
bin_width |
|
Value
This function returns a list containing:
1) main (list) containing the main results as vectors;
-
geo_id_microofgeo_id_macro(stringcolumn) containing the (higher-level) geographic IDs of the assessment -
exposure_mean(numericcolumn) containing the (population-weighted) mean exposure -
population_total(integercolumn) containing the total population in each geographic unit, if population data was provided
2) detailed (list) containing detailed (and interim) results.
Author(s)
Arno Pauwels & Liliana Vazquez Fernandez
Examples
# Goal: determine population-weighted mean PM2.5 exposure for several
# neighborhoods of Brussels (Belgium)
path <- system.file("extdata", "exdat_pwm_1.tif", package = "healthiar")
exdat_pwm_1 <- terra::rast(path)
pwm <- prepare_exposure(
poll_grid = exdat_pwm_1, # Formal class SpatRaster
geo_units = exdat_pwm_2, # sf of the geographic sub-units
population = sf::st_drop_geometry(exdat_pwm_2$population), # population per geographic sub-unit
geo_id_macro = sf::st_drop_geometry(exdat_pwm_2$region) # higher-level IDs to aggregate at
)
pwm$exposure_main # population-weighted mean exposures for the (higher-level) geographic units
Convert multi-year life table to single year life table
Description
This function determines populations and deaths by one year age groups.
Usage
prepare_lifetable(age_group, population, bhd)
Arguments
age_group |
|
population |
|
bhd |
|
Details
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" (WHO 2020).
Detailed information about the methodology (including equations) is available in the package vignette. More specifically, see chapters:
Value
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 and more columns containing input data or results
Author(s)
Alberto Castro & Axel Luyten
References
WHO (2020). “Health impact assessment of air pollution: AirQ+ life table manual.” World Health Organization - Regional Office for Europe. https://www.who.int/europe/publications/i/item/WHO-EURO-2020-1559-41310-56212.
See Also
Downstream:
attribute_lifetable
Examples
# 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)
)
Create the BEST-COST Multidimensional Deprivation Index (MDI)
Description
This function creates the BEST-COST Multidimensional Deprivation Index (MDI) and checks internal
consistency of the single deprivation indicators using Cronbach's coefficient \alpha and
other internal consistency checks
Usage
prepare_mdi(
geo_id_micro,
edu,
unemployed,
single_parent,
pop_change,
no_heating,
n_quantile,
verbose = TRUE
)
Arguments
geo_id_micro |
|
edu |
|
unemployed |
|
single_parent |
|
pop_change |
|
no_heating |
|
n_quantile |
|
verbose |
|
Details
Methodology
This function condenses socio-economic indicators into a multiple deprivation index (MDI) (Mogin et al. 2025). The reliability of the MDI is assessed using Cronbach's alpha (Cronbach 1951).
Detailed information about the methodology (including equations) is available in the package vignette. More specifically, see chapters:
Data completeness and imputation
Ensure the data set is as complete as possible. Otherwise, you can try to impute missing data, but R^2 should be greater than or equal to 0.7.
Plots
See the example below for how to reproduce the box plots and
the histogram after the prepare_mdi function call.
Value
This function returns a list containing
1) mdi_main (tibble) with the columns (selection);
-
geo_id_microcontaining thenumericgeo id's -
MDIcontaining thenumericBEST-COST Multidimensional Deprivation Index values -
MDI_indexnumericdecile based on values in the columnMDI additional columns containing the function input data
2) mdi_detailed (list) with several elements for the internal consistency check of the BEST-COST
Multidimensional Deprivation Index.
-
boxplot(language) containing the code to reproduce the boxplot of the single indicators -
histogram(language) containing the code to reproduce a histogram of the BEST-COST Multidimensional Deprivation Index (MDI) values with a normal distribution curve -
descriptive_statistics(listtable of descriptive statistics (mean, SD, min, max) of the normalized input data and the MDI -
cronbachs_alpha_value(numeric valueSee the Details section for the reliability rating this value indicates -
pearsons_corr_coeff(numeric vector) Person's correlation coefficient (pairwise-comparisons)
Author(s)
Carl Baravelli, Vanessa Gorasso, Alberto Castro & Axel Luyten
References
Cronbach LJ (1951).
“Coefficient alpha and the internal structure of tests.”
Psychometrika, 16(3), 297–334.
doi:10.1007/BF02310555.
Mogin G, Gorasso V, Idavain J, Lepnurm M, Delaunay-Havard S, Kocbach Bølling A, Buekers J, Luyten A, Devleesschauwer B, Baravelli CM (2025).
“A scoping review of multiple deprivation indices in Europe.”
European Journal of Public Health, 35(6), 1122-1128.
doi:10.1093/eurpub/ckaf190, https://academic.oup.com/eurpub/article-pdf/35/6/1122/65042936/ckaf190.pdf.
See Also
Downstream:
socialize
Examples
# Goal: create the BEST-COST Multidimensional Deprivation Index for
# a selection of geographic units
results <- prepare_mdi(
geo_id_micro = exdat_prepare_mdi$id,
edu = exdat_prepare_mdi$edu,
unemployed = exdat_prepare_mdi$unemployed,
single_parent = exdat_prepare_mdi$single_parent,
pop_change = exdat_prepare_mdi$pop_change,
no_heating = exdat_prepare_mdi$no_heating,
n_quantile = 10,
verbose = TRUE
)
results$mdi_main |>
dplyr::select(geo_id_micro, MDI, MDI_index) |>
dplyr::slice(1:15)
# Reproduce plots after the function call
eval(results$mdi_detailed$boxplot)
eval(results$mdi_detailed$histogram)
Consider socio-economic aspects in the attributable health impacts
Description
This function analyzes differences in attributable health impacts across study areas
looking at the value of a socio-economic indicator (e.g. multiple deprivation index).
If nothing is entered in the argument output_attribute,
it is assumed that all data come from a table and the argument refer to the columns of that table.
Usage
socialize(
output_attribute = NULL,
age_group,
geo_id_micro,
social_indicator = NULL,
increasing_deprivation = TRUE,
n_quantile = NULL,
social_quantile = NULL,
population = NULL,
ref_prop_pop = NULL,
impact = NULL,
exp = NULL,
bhd = NULL,
pop_fraction = NULL
)
Arguments
output_attribute |
|
age_group |
|
geo_id_micro |
|
social_indicator |
|
increasing_deprivation |
|
n_quantile |
|
social_quantile |
|
population |
|
ref_prop_pop |
|
impact |
(only if |
exp |
(only if |
bhd |
(only if |
pop_fraction |
(only if |
Details
Methodology
This function estimates the absolute and relative differences in attributable health impacts comparing study areas with different values for a socio-economic indicator (Renard et al. 2019; Otavova et al. 2022).
Detailed information about the methodology (including equations) is available in the package vignette. More specifically, see chapters:
Value
This function returns a list containing the impact (absolute and relative) theoretically attributable to the difference in the social indicator (e.g. degree of deprivation) between the quantiles:
1) social_main (tibble) containing the main results;
-
difference_value(numericcolumn) attributable health burden/impact due to differences in deprivation levels And more
2) social_detailed (list) containing detailed (and interim) results.
-
input_data_with_quantile(tibble) containing input data and information about the social quantile -
results_all_parameters(tibble) containing deprivation-related results -
parameters_overall(tibble) containing overall results for different input variables -
parameters_per_quantile(tibble) containing quantile-specific results for different input variables
If the argument output_attribute was specified, then the two lists are added next to the existing attribute output.
Author(s)
Alberto Castro & Axel Luyten
References
Otavova M, Faes C, Bouland C, De Clercq E, Vandeninden B, Eggerickx T, Sanderson J, Devleesschauwer B, Masquelier B (2022).
“Inequalities in mortality associated with housing conditions in Belgium between 1991 and 2020.”
BMC Public Health, 22(1), 2397.
ISSN 1471-2458, doi:10.1186/s12889-022-14819-w.
Renard F, Devleesschauwer B, Speybroeck N, Deboosere P (2019).
“Monitoring health inequalities when the socio-economic composition changes: are the slope and relative indices of inequality appropriate? Results of a simulation study.”
BMC Public Health, 19(1), 662.
ISSN 1471-2458, doi:10.1186/s12889-019-6980-1.
See Also
Upstream:
attribute_health,attribute_lifetable,prepare_mdi,
Examples
# Goal: determine fraction of attributable health impact that can
# be attributed to differences in deprivation between the geographic
# units under analysis
## Create assessments for multiple geographic units for the age group
## 40 years and younger
results_age_groups <-
healthiar::attribute_health(
age_group = exdat_socialize$age_group,
exp_central = exdat_socialize$pm25_mean,
cutoff_central = 0,
rr_central = exdat_socialize$rr,
erf_shape = "log_linear",
rr_increment = 10,
bhd_central = exdat_socialize$mortality,
population = exdat_socialize$population,
geo_id_micro = exdat_socialize$geo_unit)
## Difference in attributable impacts between geographic units
## that is attributable to differences in deprivation
results <- socialize(
output_attribute = results_age_groups,
age_group = exdat_socialize$age_group, # The same as in attribute_health()
ref_prop_pop = exdat_socialize$ref_prop_pop,
geo_id_micro = exdat_socialize$geo_unit,
social_indicator = exdat_socialize$score,
n_quantile = 10,
increasing_deprivation = TRUE)
results$social_main |>
dplyr::filter(difference_type == "relative") |>
dplyr::filter(difference_compared_with == "overall") |>
dplyr::select(first, last, difference_type, difference_value, comment)
Obtain age-standardized health impacts
Description
This function obtains age-standardized health impacts based on multiple age-group specific assessments
Usage
standardize(output_attribute, age_group, ref_prop_pop = NULL)
Arguments
output_attribute |
|
age_group |
|
ref_prop_pop |
|
Details
Methodology
This function applies the direct method of standardization, where the age-specific rates observed in a study population are applied to a standard (reference) population distribution.
For age standardization in health impact assessments, the World Health Organization (Ahmad et al. 2001) and the Global Burden of Disease study (GBD 2019 Demographics Collaborators 2020) provide the relevant information on this topic.
Detailed information about the methodology (including equations) is available in the package vignette. More specifically, see chapters:
This function works after running attribute_health() or attribute_lifetable() functions.
If you want to use it in combination with compare(),
please standardize first the results of attribute functions and then compare.
Value
This function returns a list containing:
1) health_main (tibble) containing the age-standardized main results;
2) health_detailed (tibble) containing the results per age group.
Author(s)
Alberto Castro & Axel Luyten
References
Ahmad OB, Pinto CB, Lopez AD, Murray CJ, Lozano R, Inoue M (2001).
“Age standardization of rates: a new WHO standard.”
Technical Report GPE Discussion Paper Series: No. 31, World Health Organization, Geneva.
GBD 2019 Demographics Collaborators (2020).
“Global age-sex-specific fertility, mortality, healthy life expectancy (HALE), and population estimates in 204 countries and territories, 1950-2019: a comprehensive demographic analysis for the Global Burden of Disease Study 2019.”
The Lancet, 396(10258), 1160-1203.
doi:10.1016/S0140-6736(20)30977-6.
See Also
Upstream:
attribute_health,attribute_lifetable
Examples
# Goal: age-standardize two age group-specific impacts
output_attribute <- attribute_health(
rr_central = 1.063,
rr_increment = 10,
erf_shape = "log_linear",
cutoff_central = 0,
age_group = c("below_40", "above_40"),
exp_central = c(8.1, 10.9),
bhd_central = c(1000, 4000),
population = c(100000, 500000)
)
results <- standardize(
output_attribute = output_attribute,
age_group = c("below_40", "above_40"),
ref_prop_pop = c(0.5, 0.5)
)
results$health_detailed$results_raw$impact_per_100k_inhab # age group-specific impact rate
results$health_main$impact_per_100k_inhab # age-standardized impact rate
Get Monte Carlo confidence intervals
Description
This function obtains a summary of uncertainty (based on central, lower and upper estimates of at least one input variable) using a Monte Carlo simulation.
Input variables that will be processed are:
relative_risk (
rr_...)exposure (
exp_...)cutoff (
cutoff_...)baseline health data (
bhd_...)disability weight (
dw_...)duration (
duration_...)
Usage
summarize_uncertainty(output_attribute, n_sim, seed = NULL)
Arguments
output_attribute |
|
n_sim |
|
seed |
|
Details
Function arguments
seed
If the seed argument is specified then the parallel package
is used to generate independent L’Ecuyer random number streams.
One stream is allocated per variable (or per variable–geography combination, as needed),
ensuring reproducible and independent random draws across variables and scenarios.
Methodology
This function summarizes the uncertainty of the attributable health impacts (i.e.a single confidence interval instead of many combinations). For this purpose, it applies a Monte Carlo simulation (Robert and Casella 2004; Rubinstein and Kroese 2016).
Detailed information about the methodology (including equations) is available in the package vignette. More specifically, see chapters:
Value
This function returns a list containing:
1) uncertainty_main (tibble) containing the numeric
summary uncertainty central estimate and corresponding lower and upper confidence intervals
for the attributable health impacts obtained through Monte Carlo simulation;
2) uncertainty_detailed (list) containing detailed (and interim) results.
-
impact_by_sim(tibble) containing the results for each simulation -
uncertainty_by_geo_id_micro(tibble) containing results for each geographic unit under analysis (specified ingeo_id_microargument in the precedingattribute_healthcall)
The two results elements are added to the existing output.
Author(s)
Alberto Castro & Axel Luyten
References
Robert CP, Casella G (2004).
Monte Carlo Statistical Methods, Springer Texts in Statistics.
Springer Science & Business Media.
doi:10.1007/978-1-4757-4145-2.
Rubinstein RY, Kroese DP (2016).
Simulation and the Monte Carlo Method.
John Wiley & Sons.
doi:10.1002/9781118631980.
See Also
Upstream:
attribute_health,attribute_lifetable,compare
Examples
# Goal: obtain summary uncertainty for an existing attribute_health() output
# First create an assessment
attribute_health_output <- attribute_health(
erf_shape = "log_linear",
rr_central = 1.369,
rr_lower = 1.124,
rr_upper = 1.664,
rr_increment = 10,
exp_central = 8.85,
exp_lower = 8,
exp_upper = 10,
cutoff_central = 5,
bhd_central = 30747,
bhd_lower = 28000,
bhd_upper = 32000
)
# Then run Monte Carlo simulation
results <- summarize_uncertainty(
output_attribute = attribute_health_output,
n_sim = 100
)
results$uncertainty_main$impact # Central, lower and upper estimates
Check the input_args data of attribute_master()
Description
Check the input_args data in attribute_master() and provides specific warnings or errors if needed.
Usage
validate_input_attribute(input_args, is_lifetable)
Arguments
input_args |
|
is_lifetable |
|
Value
This function returns warning or error messages if needed.
Author(s)
Alberto Castro & Axel Luyten