| prepare_mdi | R Documentation |
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
prepare_mdi(
geo_id_micro,
edu,
unemployed,
single_parent,
pop_change,
no_heating,
n_quantile,
verbose = TRUE
)
geo_id_micro |
|
edu |
|
unemployed |
|
single_parent |
|
pop_change |
|
no_heating |
|
n_quantile |
|
verbose |
|
Methodology
This function condenses socio-economic indicators into a multiple deprivation index (MDI) \insertCiteMogin2025_ejphhealthiar. The reliability of the MDI is assessed using Cronbach's alpha \insertCiteCronbach1951_phealthiar.
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.
This function returns a list containing
1) mdi_main (tibble) with the columns (selection);
geo_id_micro containing the numeric geo id's
MDI containing the numeric BEST-COST Multidimensional Deprivation Index values
MDI_index numeric decile based on values in the column MDI
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 (list table of descriptive statistics (mean, SD, min, max) of the normalized input data and the MDI
cronbachs_alpha_value (numeric value See the Details section for the reliability rating this value indicates
pearsons_corr_coeff (numeric vector) Person's correlation coefficient (pairwise-comparisons)
Carl Baravelli, Vanessa Gorasso, Alberto Castro & Axel Luyten
Downstream: socialize
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.