Learn R Programming

healthiar (version 0.2.3)

prepare_mdi: 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
)

Value

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)

Arguments

geo_id_micro

Numeric vector or string vector specifying the unique ID codes of each geographic area considered in the assessment (geo_id_micro).

edu

Numeric vector indicating educational attainment as % of individuals (at the age 18 or older) without a high school diploma (ISCED 0-2) per geo unit

unemployed

Numeric vector containing % of unemployed individuals in the active population (18-65) per geo unit

single_parent

Numeric vector containing single-parent households as % of total households headed by a single parent per geo unit

pop_change

Numeric vector containing population change as % change in population over the previous 5 years (e.g., 2017-2021) per geo unit

no_heating

Numeric vector containing % of households without central heating per geo unit

n_quantile

Integer value specifying the number of quantiles in the analysis.

verbose

Boolean indicating whether function output is printed to console. Default: TRUE.

Author

Carl Baravelli, Vanessa Gorasso, Alberto Castro & Axel Luyten

Details

Methodology

This function condenses socio-economic indicators into a multiple deprivation index (MDI) Mogin2025_ejphhealthiar. The reliability of the MDI is assessed using Cronbach's alpha Cronbach1951_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.

References

See Also

  • Downstream: socialize

Examples

Run this code
# 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)


Run the code above in your browser using DataLab