This function considers socio-economic aspects (e.g. multiple deprivation index) in the attributable health impacts. 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
Listcontaining the outputs of thehealthiar::attribute_health()assessments for each age group (each list element should be an age group-specific assessment).- age_group
String vectorwith the age groups included in the age standardization. The vector refers to age-dependent data in this function and tooutput_attribute(if provided).- geo_id_micro,
Numeric vectororstring vectorspecifying the unique ID codes of each geographic area considered in the assessment (geo_id_micro) Argument must be entered for iterations. See Details for more info.Numeric vectorshowing the social indicator used for the analysis, e.g. a deprivation score (indicator of economic wealth) for each geographic unit. Based on this andn_quantile,social_quantilewill be calculated.- increasing_deprivation
Booleanvariable (TRUE/FALSE) specifying whether an increase insocial_indicatorcorresponds to an increase (TRUE) or decreaseFALSEin deprivation. Default:TRUE.- n_quantile
Integer valuespecifying the number of quantiles in the analysis.Integer vectorshowing the values from 1 to the number of quantiles assigned to each geographic unit. Either entersocial_indicatorandn_quantileorsocial_quantile- population
Numeric vectorspecifying the population by age group and geographic unit.- ref_prop_pop
Numeric vectorspecifying with the reference proportion of population for each age group. If this argument is empty, the proportion ofpopulationby age group in the provided data will be used.- impact
(only if
output_attributenot specified)Numeric vectorcontaining the attributable health impacts by both age group and geo id.- exp
(only if
output_attributenot specified)Numeric vectorspecifying the exposure level(s) to the environmental stressor.- bhd
(only if
output_attributenot specified)Numeric vectorspecifying the baseline health data of the health outcome of interest per age group. See Details for more info.- pop_fraction
(only if
output_attributenot specified)Numeric vectorspecifying the population attributable fraction by age group and geographic unit.
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 levelsAnd more
2) social_detailed (list) containing detailed (and interim) results.
input_data_with_quantile(tibble) containing input data and information about the social quantileresults_all_parameters(tibble) containing deprivation-related resultsparameters_overall(tibble) containing overall results for different input variablesparameters_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.
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 = rep(c("below_40", "40_plus"), each = 9037),
exp_central = c(exdat_socialize$PM25_MEAN, exdat_socialize$PM25_MEAN-0.1),
cutoff_central = 0,
rr_central = 1.08,
erf_shape = "log_linear",
rr_increment = 10,
bhd_central = c(exdat_socialize$MORTALITY_below_40, exdat_socialize$MORTALITY_40_plus),
population = c(exdat_socialize$POPULATION_below_40, exdat_socialize$POPULATION_40_plus),
geo_id_micro = rep(exdat_socialize$CS01012020, 2))
## Difference in attributable impacts between geographic units
## that is attributable to differences in deprivation
results <- socialize(
age_group = c("below_40", "40_plus"),
ref_prop_pop = c(0.5, 0.5),
output_attribute = results_age_groups,
geo_id_micro = exdat_socialize$CS01012020,
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)
#> # A tibble: 1 × 5
#> first last difference_type difference_value comment
#> <dbl> <dbl> <chr> <dbl> <chr>
#> 1 70.7 59.0 relative -0.0110 It can be interpreted as fractio…
