attribute_master: Attributabe health impact to an environmental stressor

View source: R/attribute_master.R

attribute_masterR Documentation

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,
  threshold = 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,
  main_results_by = 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,
  fraction_lived = NULL,
  input_args = NULL
)

Arguments

approach_risk

String value specifying the risk method. Options: "relative_risk" (default) or "absolute_risk".

exp_central, exp_lower, exp_upper

Numeric value or numeric vector specifying the exposure level(s) to the environmental stressor and (optionally) the corresponding lower and upper bound of the 95% confidence interval. See Details for more info.

cutoff_central, cutoff_lower, cutoff_upper

Numeric value specifying the exposure cut-off value, i.e. the exposure level below which no health impacts are quantified, and (optionally) the corresponding lower and upper 95% confidence interval bounds. Default: 0, or same value as threshold, if it is entered. If cutoff is higher than threshold, the exposure-response function is truncated at the cut-off value. Expressed in the same unit as the exposure. See the vignette chapter Cut-off vs. threshold.

threshold

Numeric value specifying the effect threshold, i.e. the exposure level from which the exposure-response function starts to show an effect. It is the anchor of the curve and is therefore subtracted from the exposure. Default: same value as the cut-off. Expressed in the same unit as the exposure. See the vignette chapter Cut-off vs. threshold.

pop_exp

Numeric vector specifying the absolute size of the population(s) exposed to each exposure category. See Details for more info. Only applicable in AR pathways; always required.

erf_eq_central, erf_eq_lower, erf_eq_upper

String or function specifying the exposure-response function and (optionally) the corresponding lower and upper 95% confidence interval functions. See Details for more info. Required in AR pathways; in RR pathways required only if rr_... argument(s) not specified.

rr_central, rr_lower, rr_upper

Numeric value specifying the central relative risk estimate and (optionally) the corresponding lower and upper 95% confidence interval bounds. Only applicable in RR pathways; not required if erf_eq_... argument(s) already specified.

rr_increment

Numeric value specifying the exposure increment for which the provided relative risk is valid. See Details for more info. Only applicable in RR pathways; not required if erf_eq_... argument(s) already specified.

erf_shape

String value specifying the exposure-response function shape to be assumed. Options (no default): "linear", log_linear", "linear_log", "log_log". Input exposure values must be expressed in same unit as the increment of the relative risk. The re-scale of the relative risk is unbounded above and users are responsible for the plausible range. Only applicable in RR pathways; not required if erf_eq_... argument(s) already specified.

bhd_central, bhd_lower, bhd_upper

Numeric value or numeric vector providing the baseline health data of the health outcome of interest in the study population and (optionally) the corresponding lower bound and the upper 95% confidence interval bounds. See Details for more info. Only applicable in RR pathways; always required.

prop_pop_exp

Numeric value or numeric vector specifying the population fraction(s) exposed for each exposure (category), i.e. the proportion of the total population that falls in each exposure category. Default: 1. The fractions do not have to add up to 1: the part of the population that they do not cover is treated as unexposed, i.e. it gets the relative risk of the reference level. E.g, in air pollution assessments everybody is usually exposed and the fractions add up to 1, whereas in noise assessments they typically add up to less than 1, because exposure is only reported above a given level. Accordingly, bhd_... must always refer to the total population. See Details for more info. Only applicable in RR pathways.

geo_id_micro, geo_id_macro

Numeric vector or string vector providing unique IDs of the geographic area considered in the assessment (geo_id_micro) and (optionally) providing higher-level IDs (geo_id_macro) to aggregate the geographic areas at. See Details for more info. Only applicable in assessments with multiple geographic units.

age_group

Numeric vector or string vector providing the age groups considered in the assessment. In case of use in attribute_lifetable)(), it must be a numeric and contain single year age groups. See Details for more info. Optional argument for attribute_health(); needed for attribute_lifetable().

sex

Numeric vector or string vector specifying the sex of the groups considered in the assessment.Optional argument.

population

Numeric vector For attribute_lifetable(), it is an obligatory argument specifying the mid-year populations per age (i.e. age group size = 1 year) for the (first) year of analysis. For attribute_health() it is an optional argument which specifies the population used to calculate attributable impacts rate per 100 000 population. See Details for more info.

info

String, data frame or tibble providing information about the assessment. This will be added to the results table as column(s) keeping the name(s) that you entered with the prefix info_ (e.g. a column education becomes info_education) if a data frame is entered, or as one single column called info if a vector is entered. Different values define sub-groups (e.g. education levels or exposure-outcome pairs), which are assessed separately and summed in the main results unless named in main_results_by. Values that only differ by age or sex (e.g. age bands) do not define additional sub-groups. Optional argument.

main_results_by

Character vector naming the dimensions that the main results are reported by, i.e. the dimensions whose impacts must never be added together, e.g. different exposure-outcome pairs. By default all dimensions except the geographic units and the uncertainty (_ci) columns are summed in the main results. Names entered here are kept as separate rows instead. Options: the columns of info (named as you named them, or "info" if you entered a vector instead of a data frame), "sex", "age_group", "exp_category", "geo_id_micro", "geo_id_macro" and, in attribute_lifetable(), "year". Note that this argument does not create the results_by_... tables of the detailed output, which are available anyway: it determines which dimensions survive in health_main and in all of them. See the vignette chapter Multiple exposure-outcome pairs. Optional argument.

dw_central, dw_lower, dw_upper

Numeric value or numeric vector providing the disability weight associated with the morbidity health outcome of interest and (optionally) the corresponding lower bound and the upper 95% confidence interval bounds. Only applicable in assessments of YLD (years lived with disability).

duration_central, duration_lower, duration_upper

Numeric value or numeric vector providing the duration associated with the morbidity health outcome of interest in years and (optionally) the corresponding lower and upper bounds of the 95% confidence interval. Default: 1. See Details for more info. Only applicable in assessments of YLD (years lived with disability).

is_lifetable

Boolean INTERNAL argument specifying if the life table approach is applied (TRUE) or not (FALSE)

health_outcome

String specifying the desired result of the life table assessment. Options: "deaths" (premature deaths), "yll" (years of life lost).

min_age, max_age

Numeric value specifying the minimum and maximum age for which the exposure will affect the exposed population, respectively. See Details for more info.

approach_newborns

String specifying whether newborns are to be considered in the years after the year of analysis or not. Options: "without_newborns" (default), "with_newborns". See Details for more info.

approach_exposure

String specifying whether exposure is constant or only in one year. Options: "single_year" (default), "constant".

year_of_analysis

Numeric value providing the first with exposure to the environmental stressor.

time_horizon

Numeric value specifying the time horizon (number of years) for which the attributable YLL or premature deaths are to be considered. See Details for more info. Optional argument.

fraction_lived

Numeric vector Numeric vector or single numeric scalar referring to the average fraction of the age interval lived by individuals who die within that interval. Default is 0.5.

Value

This function returns a list containing:

1) health_main (tibble) containing the main results;

  • impact (numeric column) attributable health burden/impact

  • pop_fraction (numeric column) 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


healthiar documentation built on Oct. 12, 2026, 5:07 p.m.