# Cargamos las librerías
pacman::p_load(tidyverse, #colección de paquetes, de la cual utilizaremos dplyr
haven, # cargar y exportar bases de datos en formatos .sav
dplyr) # para manipular datos
# Importamos los datos
casen <- read_sav("../assignment/input/casen.sav")Construcción de índices: Análisis de calidad
Presentación
Repaso: Análisis para la contruscción de índices (Calidad: Confiabilidad)
1. Dimensión Trabajo
Correlaciones
trab <- select(proc_casen, ocupacion, seguridad_social, jubilaciones)
sjPlot::tab_corr(trab,
na.deletion = "pairwise",
triangle = "lower")| ocupacion | seguridad_social | jubilaciones | |
| ocupacion | |||
| seguridad_social | 0.863*** | ||
| jubilaciones | 0.295*** | 0.254*** | |
| Computed correlation used pearson-method with pairwise-deletion. | |||
Análisis
Alpha de Cronbach
trab_alpha <- psych::alpha(trab)
trab_alpha
Reliability analysis
Call: psych::alpha(x = trab)
raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
0.72 0.73 0.76 0.47 2.7 0.0012 0.61 0.33 0.3
95% confidence boundaries
lower alpha upper
Feldt 0.72 0.72 0.72
Duhachek 0.72 0.72 0.72
Reliability if an item is dropped:
raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r
ocupacion 0.40 0.41 0.25 0.25 0.68 0.00264 NA
seguridad_social 0.46 0.46 0.30 0.30 0.84 0.00242 NA
jubilaciones 0.92 0.93 0.86 0.86 12.68 0.00033 NA
med.r
ocupacion 0.25
seguridad_social 0.30
jubilaciones 0.86
Item statistics
n raw.r std.r r.cor r.drop mean sd
ocupacion 2e+05 0.89 0.89 0.91 0.71 0.78 0.42
seguridad_social 2e+05 0.87 0.88 0.89 0.69 0.82 0.38
jubilaciones 2e+05 0.66 0.64 0.30 0.29 0.23 0.42
Non missing response frequency for each item
0 1 miss
ocupacion 0.22 0.78 0
seguridad_social 0.18 0.82 0
jubilaciones 0.77 0.23 0
trab_alpha$total$raw_alpha[1] 0.7213385
Análisis
2. IPM
ipm <- casen %>% select(
# Educación
hh_d_asis,
hh_d_rez,
hh_d_esc,
# Salud
hh_d_mal,
hh_d_acc,
hh_d_prevs,
# Trabajo y Seguridad Social
hh_d_act,
hh_d_cot,
hh_d_jub,
# Vivienda y Entorno
hh_d_habitab,
hh_d_servbas,
hh_d_entorno,
# Redes y Cohesión Social
hh_d_appart,
hh_d_tsocial,
hh_d_seg)Correlaciones
sjPlot::tab_corr(ipm,
na.deletion = "pairwise",
triangle = "lower")| Hogar carente en asistencia | Hogar carente en rezago escolar | Hogar carente en escolaridad | Hogar carente en malnutrición en niños/as |
Hogar carente en atención | Hogar carente en adscripción a sistema de salud |
Hogar carente en ocupación | Hogar carente en seguridad social | Hogar carente en jubilaciones | Hogar carente en habitabilidad | Hogar carente en servicios básicos | Hogar carente en entorno | Hogar carente en apoyo y participación social |
Hogar carente en trato igualitario | Hogar carente en seguridad | |
| Hogar carente en asistencia | |||||||||||||||
| Hogar carente en rezago escolar | 0.028*** | ||||||||||||||
| Hogar carente en escolaridad | 0.079*** | 0.085*** | |||||||||||||
| Hogar carente en malnutrición en niños/as |
0.049*** | 0.009*** | 0.011*** | ||||||||||||
| Hogar carente en atención | -0.009*** | 0.000 | -0.043*** | -0.004* | |||||||||||
| Hogar carente en adscripción a sistema de salud |
0.064*** | 0.010*** | 0.041*** | -0.015*** | 0.014*** | ||||||||||
| Hogar carente en ocupación | 0.013*** | 0.017*** | 0.017*** | 0.016*** | 0.020*** | 0.042*** | |||||||||
| Hogar carente en seguridad social | 0.058*** | 0.042*** | 0.109*** | 0.020*** | -0.010*** | 0.132*** | -0.032*** | ||||||||
| Hogar carente en jubilaciones | -0.015*** | -0.014*** | 0.093*** | -0.041*** | 0.029*** | 0.017*** | -0.002 | 0.026*** | |||||||
| Hogar carente en habitabilidad | 0.071*** | 0.052*** | 0.124*** | 0.063*** | -0.008*** | 0.052*** | 0.049*** | 0.077*** | -0.003 | ||||||
| Hogar carente en servicios básicos | 0.033*** | 0.014*** | 0.116*** | 0.014*** | -0.026*** | 0.018*** | -0.015*** | 0.058*** | -0.012*** | 0.111*** | |||||
| Hogar carente en entorno | 0.009*** | -0.006** | 0.086*** | -0.000 | 0.005* | -0.003 | 0.032*** | -0.091*** | 0.016*** | 0.052*** | 0.111*** | ||||
| Hogar carente en apoyo y participación social |
0.027*** | 0.019*** | 0.034*** | 0.003 | -0.010*** | 0.063*** | 0.031*** | 0.047*** | 0.005* | 0.056*** | 0.011*** | -0.005* | |||
| Hogar carente en trato igualitario | 0.025*** | 0.016*** | -0.004 | 0.025*** | 0.065*** | 0.032*** | 0.054*** | 0.017*** | -0.022*** | 0.081*** | 0.008*** | 0.042*** | -0.002 | ||
| Hogar carente en seguridad | 0.005* | 0.020*** | 0.015*** | 0.025*** | 0.020*** | 0.016*** | 0.050*** | 0.025*** | 0.001 | 0.094*** | -0.023*** | 0.104*** | 0.007** | 0.093*** | |
| Computed correlation used pearson-method with pairwise-deletion. | |||||||||||||||
Análisis
Alpha de Cronbach
ipm_alpha <- psych::alpha(ipm)Some items ( hh_d_acc ) were negatively correlated with the first principal component and
probably should be reversed.
To do this, run the function again with the 'check.keys=TRUE' option
ipm_alpha
Reliability analysis
Call: psych::alpha(x = ipm)
raw_alpha std.alpha G6(smc) average_r S/N ase mean sd median_r
0.31 0.3 0.3 0.028 0.43 0.0022 0.12 0.095 0.019
95% confidence boundaries
lower alpha upper
Feldt 0.31 0.31 0.32
Duhachek 0.31 0.31 0.32
Reliability if an item is dropped:
raw_alpha std.alpha G6(smc) average_r S/N alpha se var.r med.r
hh_d_asis 0.30 0.28 0.28 0.027 0.39 0.0022 0.0017 0.017
hh_d_rez 0.30 0.29 0.29 0.029 0.42 0.0022 0.0017 0.020
hh_d_esc 0.25 0.25 0.25 0.024 0.34 0.0024 0.0013 0.017
hh_d_mal 0.31 0.30 0.30 0.030 0.44 0.0022 0.0017 0.020
hh_d_acc 0.32 0.31 0.31 0.032 0.46 0.0022 0.0016 0.025
hh_d_prevs 0.29 0.28 0.28 0.027 0.39 0.0023 0.0016 0.019
hh_d_act 0.31 0.29 0.29 0.029 0.42 0.0022 0.0017 0.019
hh_d_cot 0.30 0.28 0.28 0.027 0.39 0.0022 0.0014 0.017
hh_d_jub 0.32 0.31 0.31 0.031 0.45 0.0022 0.0016 0.020
hh_d_habitab 0.25 0.24 0.24 0.023 0.32 0.0024 0.0014 0.017
hh_d_servbas 0.29 0.28 0.28 0.028 0.40 0.0023 0.0015 0.020
hh_d_entorno 0.30 0.29 0.29 0.028 0.41 0.0022 0.0014 0.020
hh_d_appart 0.30 0.29 0.29 0.029 0.42 0.0022 0.0017 0.020
hh_d_tsocial 0.30 0.28 0.28 0.027 0.39 0.0022 0.0017 0.017
hh_d_seg 0.29 0.28 0.28 0.027 0.39 0.0022 0.0016 0.017
Item statistics
n raw.r std.r r.cor r.drop mean sd
hh_d_asis 2e+05 0.21 0.31 0.182 0.1041 0.026 0.16
hh_d_rez 2e+05 0.16 0.28 0.121 0.0762 0.016 0.12
hh_d_esc 2e+05 0.49 0.39 0.330 0.1803 0.320 0.47
hh_d_mal 2e+05 0.19 0.26 0.074 0.0400 0.047 0.21
hh_d_acc 2e+05 0.17 0.23 0.021 0.0077 0.059 0.24
hh_d_prevs 2e+05 0.27 0.32 0.204 0.1218 0.050 0.22
hh_d_act 2e+05 0.29 0.28 0.121 0.0585 0.127 0.33
hh_d_cot 2e+05 0.43 0.32 0.211 0.1047 0.338 0.47
hh_d_jub 2e+05 0.26 0.24 0.038 0.0349 0.118 0.32
hh_d_habitab 2e+05 0.45 0.41 0.370 0.2059 0.173 0.38
hh_d_servbas 2e+05 0.29 0.31 0.182 0.1139 0.073 0.26
hh_d_entorno 2e+05 0.29 0.30 0.158 0.0784 0.108 0.31
hh_d_appart 2e+05 0.25 0.28 0.118 0.0671 0.071 0.26
hh_d_tsocial 2e+05 0.34 0.31 0.181 0.0917 0.152 0.36
hh_d_seg 2e+05 0.31 0.32 0.193 0.1102 0.092 0.29
Non missing response frequency for each item
0 1 miss
hh_d_asis 0.97 0.03 0.00
hh_d_rez 0.98 0.02 0.00
hh_d_esc 0.68 0.32 0.00
hh_d_mal 0.95 0.05 0.00
hh_d_acc 0.94 0.06 0.00
hh_d_prevs 0.95 0.05 0.00
hh_d_act 0.87 0.13 0.00
hh_d_cot 0.66 0.34 0.01
hh_d_jub 0.88 0.12 0.00
hh_d_habitab 0.83 0.17 0.00
hh_d_servbas 0.93 0.07 0.00
hh_d_entorno 0.89 0.11 0.00
hh_d_appart 0.93 0.07 0.00
hh_d_tsocial 0.85 0.15 0.00
hh_d_seg 0.91 0.09 0.00
ipm_alpha$total$raw_alpha[1] 0.3107903