| socialize | R Documentation |
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.
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
)
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 |
Methodology
This function estimates the absolute and relative differences in attributable health impacts comparing study areas with different values for a socio-economic indicator \insertCiteRenard2019_bmchealthiar.
Detailed information about the methodology (including equations) is available in the package vignette. More specifically, see chapters:
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 (numeric column) 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.
Alberto Castro & Axel Luyten
Upstream:
attribute_health, attribute_lifetable,
prepare_mdi,
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.