1 Variable CENSO

Necesitamos calcular las frecuencias a nivel censal de las respuestas correspondientes a la categoría: “Profesional (4 o más años)” del campo P15 a nivel rural del Censo de personas. Recordemos que ésta fué la más alta correlación en relación a los ingresos expandidos (ver punto 3.4 aquí).

1.1 Lectura y filtrado de la tabla censal de personas

Leemos la tabla Censo 2017 de personas que ya tiene integrada la clave zonal:

tabla_con_clave <- readRDS("../censo_personas_con_clave_17")
r3_100 <- tabla_con_clave[c(1:100),]
kbl(r3_100) %>%
  kable_styling(bootstrap_options = c("striped", "hover")) %>%
  kable_paper() %>%
  scroll_box(width = "100%", height = "300px")
REGION PROVINCIA COMUNA DC AREA ZC_LOC ID_ZONA_LOC NVIV NHOGAR PERSONAN P07 P08 P09 P10 P10COMUNA P10PAIS P11 P11COMUNA P11PAIS P12 P12COMUNA P12PAIS P12A_LLEGADA P12A_TRAMO P13 P14 P15 P15A P16 P16A P16A_OTRO P17 P18 P19 P20 P21M P21A P10PAIS_GRUPO P11PAIS_GRUPO P12PAIS_GRUPO ESCOLARIDAD P16A_GRUPO REGION_15R PROVINCIA_15R COMUNA_15R P10COMUNA_15R P11COMUNA_15R P12COMUNA_15R clave
15 152 15202 1 2 6 13225 1 1 1 1 1 73 1 98 998 3 15101 998 1 98 998 9998 98 2 4 6 2 1 2 98 7 98 98 98 98 9998 998 998 998 4 2 15 152 15202 98 15101 98 15202012006
15 152 15202 1 2 6 13225 3 1 1 1 1 78 1 98 998 2 98 998 1 98 998 9998 98 3 98 98 98 1 2 98 7 98 98 98 98 9998 998 998 998 0 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 6 13225 3 1 2 2 2 78 1 98 998 2 98 998 1 98 998 9998 98 3 98 98 98 1 2 98 7 98 1 1 3 1965 998 998 998 0 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 6 13225 3 1 3 5 2 52 1 98 998 2 98 998 1 98 998 9998 98 1 2 5 2 1 2 98 7 98 2 1 4 1995 998 998 998 2 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 6 13225 3 1 4 11 1 44 1 98 998 2 98 998 1 98 998 9998 98 1 3 5 2 1 2 98 1 Z 98 98 98 9998 998 998 998 3 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 6 13225 9 1 1 1 1 39 1 98 998 2 98 998 1 98 998 9998 98 2 8 5 1 1 2 98 8 98 98 98 98 9998 998 998 998 8 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 6 13225 9 1 2 2 2 35 1 98 998 2 98 998 1 98 998 9998 98 2 6 5 2 1 2 98 1 Z 2 2 11 2004 998 998 998 6 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 6 13225 9 1 3 5 1 13 1 98 998 2 98 998 1 98 998 9998 98 1 7 5 2 1 2 98 98 98 98 98 98 9998 998 998 998 7 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 6 13225 9 1 4 5 1 12 1 98 998 2 98 998 1 98 998 9998 98 1 6 5 2 1 2 98 98 98 98 98 98 9998 998 998 998 6 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 6 13225 10 1 1 1 2 65 1 98 998 2 98 998 1 98 998 9998 98 2 4 5 2 1 2 98 6 98 3 3 9 1992 998 998 998 4 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 6 13225 13 1 1 1 1 50 1 98 998 2 98 998 1 98 998 9998 98 2 5 5 2 1 2 98 1 Z 98 98 98 9998 998 998 998 5 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 6 13225 13 1 2 4 2 43 1 98 998 2 98 998 1 98 998 9998 98 2 6 5 2 1 2 98 6 98 2 2 3 2002 998 998 998 6 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 6 13225 13 1 3 5 1 15 3 15201 998 2 98 998 1 98 998 9998 98 1 1 7 2 1 2 98 8 98 98 98 98 9998 998 998 998 9 2 15 152 15202 15201 98 98 15202012006
15 152 15202 1 2 6 13225 16 1 1 1 1 75 1 98 998 2 98 998 1 98 998 9998 98 3 98 98 98 1 2 98 7 98 98 98 98 9998 998 998 998 0 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 6 13225 16 1 2 16 2 58 4 98 68 6 98 998 5 98 998 9999 1 3 98 98 98 1 2 98 7 98 4 4 99 9999 68 68 68 0 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 6 13225 16 1 3 2 2 70 1 98 998 2 98 998 1 98 998 9998 98 3 98 98 98 1 2 98 7 98 5 4 99 9999 998 998 998 0 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 6 13225 17 1 1 1 2 43 2 98 998 2 98 998 1 98 998 9998 98 2 8 5 1 1 2 98 1 I 3 3 9 2008 998 998 998 8 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 6 13225 17 1 2 4 1 55 2 98 998 2 98 998 1 98 998 9998 98 2 6 5 2 1 2 98 6 98 98 98 98 9998 998 998 998 6 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 6 13225 17 1 3 5 2 13 2 98 998 2 98 998 2 15101 998 9998 98 1 7 5 2 1 2 98 98 98 98 98 98 9998 998 998 998 7 2 15 152 15202 98 98 15101 15202012006
15 152 15202 1 2 6 13225 17 1 4 5 1 8 2 98 998 2 98 998 2 15101 998 9998 98 1 2 5 2 1 2 98 98 98 98 98 98 9998 998 998 998 2 2 15 152 15202 98 98 15101 15202012006
15 152 15202 1 2 6 13225 17 1 5 15 2 29 2 98 998 4 98 998 3 98 998 2015 1 2 6 5 2 1 2 98 6 98 5 5 11 2014 998 604 604 6 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 6 13225 17 1 6 15 1 4 2 98 998 1 98 998 5 98 998 2015 1 1 0 1 2 1 2 98 98 98 98 98 98 9998 998 998 68 0 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 6 13225 17 1 7 15 2 2 2 98 998 1 98 998 3 98 998 2015 1 1 0 1 2 1 2 98 98 98 98 98 98 9998 998 998 604 0 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 6 13225 17 1 8 15 1 16 2 98 998 6 98 998 1 98 998 9998 98 2 4 5 2 1 2 98 6 98 98 98 98 9998 998 68 998 4 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 6 13225 18 1 1 1 2 74 1 98 998 2 98 998 1 98 998 9998 98 2 2 5 2 1 2 98 6 98 2 2 12 1976 998 998 998 2 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 6 13225 19 1 1 1 1 68 1 98 998 2 98 998 1 98 998 9998 98 3 98 98 98 1 2 98 7 98 98 98 98 9998 998 998 998 0 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 6 13225 20 1 1 1 1 74 1 98 998 3 15101 998 1 98 998 9998 98 2 2 5 2 1 2 98 1 Z 98 98 98 9998 998 998 998 2 2 15 152 15202 98 15101 98 15202012006
15 152 15202 1 2 6 13225 20 1 2 2 2 65 1 98 998 3 997 998 3 98 998 9999 2 2 2 5 2 1 2 98 6 98 2 2 9 1982 998 998 604 2 2 15 152 15202 98 997 98 15202012006
15 152 15202 1 2 6 13225 25 1 1 1 2 76 1 98 998 2 98 998 1 98 998 9998 98 3 98 98 98 1 2 98 6 98 8 6 3 1981 998 998 998 0 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 6 13225 25 1 2 5 2 36 1 98 998 2 98 998 1 98 998 9998 98 2 4 8 1 1 2 98 1 A 0 98 98 9998 998 998 998 12 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 6 13225 28 1 1 1 2 31 1 98 998 2 98 998 5 98 998 2007 2 2 5 5 2 1 2 98 1 A 2 2 4 2008 998 998 68 5 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 6 13225 28 1 2 4 1 35 1 98 998 2 98 998 5 98 998 2007 2 2 6 5 2 1 2 98 1 F 98 98 98 9998 998 998 68 6 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 6 13225 28 1 3 5 1 11 1 98 998 2 98 998 5 98 998 2007 2 1 5 5 2 1 2 98 98 98 98 98 98 9998 998 998 68 5 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 6 13225 28 1 4 5 1 8 1 98 998 2 98 998 1 98 998 9998 98 1 2 5 2 1 2 98 98 98 98 98 98 9998 998 998 998 2 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 6 13225 28 1 5 15 2 74 1 98 998 2 98 998 1 98 998 9998 98 2 3 5 2 1 2 98 6 98 6 6 99 9999 998 998 998 3 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 6 13225 33 1 1 1 1 41 1 98 998 2 98 998 1 98 998 9998 98 2 8 5 1 1 2 98 1 Z 98 98 98 9998 998 998 998 8 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 6 13225 33 1 2 2 2 47 1 98 998 2 98 998 1 98 998 9998 98 2 8 5 1 1 2 98 1 A 2 1 4 1996 998 998 998 8 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 6 13225 33 1 3 14 1 88 1 98 998 2 98 998 1 98 998 9998 98 3 98 98 98 1 2 98 7 98 98 98 98 9998 998 998 998 0 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 6 13225 33 1 4 14 1 65 1 98 998 2 98 998 1 98 998 9998 98 2 2 5 2 1 2 98 7 98 98 98 98 9998 998 998 998 2 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 6 13225 36 1 1 1 2 59 1 98 998 2 98 998 1 98 998 9998 98 2 2 5 2 1 2 98 6 98 8 8 2 1998 998 998 998 2 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 6 13225 36 1 2 2 1 56 1 98 998 99 99 999 1 98 998 9998 98 2 2 5 2 1 2 98 6 98 98 98 98 9998 998 999 998 2 2 15 152 15202 98 99 98 15202012006
15 152 15202 1 2 6 13225 36 1 3 5 2 36 1 98 998 2 98 998 1 98 998 9998 98 2 8 5 1 1 2 98 6 98 2 2 7 2010 998 998 998 8 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 6 13225 36 1 4 12 2 13 1 98 998 2 98 998 1 98 998 9998 98 1 7 5 2 1 2 98 98 98 98 98 98 9998 998 998 998 7 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 6 13225 36 1 5 12 2 6 1 98 998 2 98 998 1 98 998 9998 98 1 0 3 1 1 2 98 98 98 98 98 98 9998 998 998 998 0 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 6 13225 36 1 6 5 1 24 1 98 998 3 15101 998 1 98 998 9998 98 2 4 7 1 1 2 98 1 Z 98 98 98 9998 998 998 998 12 2 15 152 15202 98 15101 98 15202012006
15 152 15202 1 2 6 13225 36 1 7 11 2 24 1 98 998 3 15101 998 1 98 998 9998 98 2 4 7 1 1 2 98 1 N 2 2 11 2015 998 998 998 12 2 15 152 15202 98 15101 98 15202012006
15 152 15202 1 2 6 13225 36 1 8 12 1 6 1 98 998 2 98 998 2 15101 998 9998 98 1 0 3 1 1 2 98 98 98 98 98 98 9998 998 998 998 0 2 15 152 15202 98 98 15101 15202012006
15 152 15202 1 2 6 13225 36 1 9 12 2 1 1 98 998 1 98 998 2 15101 998 9998 98 3 98 98 98 1 2 98 98 98 98 98 98 9998 998 998 998 0 2 15 152 15202 98 98 15101 15202012006
15 152 15202 1 2 6 13225 38 1 1 1 1 19 1 98 998 3 15101 998 2 15101 998 9998 98 1 1 8 2 1 2 98 1 A 98 98 98 9998 998 998 998 9 2 15 152 15202 98 15101 15101 15202012006
15 152 15202 1 2 6 13225 39 1 1 1 1 21 1 98 998 2 98 998 1 98 998 9998 98 2 1 7 2 1 2 98 1 F 98 98 98 9998 998 998 998 9 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 6 13225 39 1 2 4 2 22 1 98 998 2 98 998 1 98 998 9998 98 2 1 8 2 1 2 98 6 98 0 98 98 9998 998 998 998 9 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 6 13225 43 1 1 1 2 26 1 98 998 2 98 998 1 98 998 9998 98 2 8 5 1 1 2 98 6 98 2 2 10 2013 998 998 998 8 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 6 13225 43 1 2 2 1 24 1 98 998 2 98 998 1 98 998 9998 98 2 8 5 1 1 2 98 1 Z 98 98 98 9998 998 998 998 8 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 6 13225 43 1 3 13 2 71 1 98 998 2 98 998 1 98 998 9998 98 2 1 5 2 1 2 98 6 98 3 3 12 1974 998 998 998 1 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 6 13225 43 1 4 5 2 6 1 98 998 2 98 998 1 98 998 9998 98 1 0 3 1 1 2 98 98 98 98 98 98 9998 998 998 998 0 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 6 13225 43 1 5 5 2 3 1 98 998 1 98 998 1 98 998 9998 98 1 0 1 1 1 2 98 98 98 98 98 98 9998 998 998 998 0 2 15 152 15202 98 98 98 15202012006
15 152 15202 1 2 8 13910 5 1 1 1 1 44 1 98 998 2 98 998 3 98 998 2005 2 2 4 7 1 1 2 98 6 98 98 98 98 9998 998 998 604 12 2 15 152 15202 98 98 98 15202012008
15 152 15202 1 2 8 13910 5 1 2 2 2 42 1 98 998 2 98 998 1 98 998 9998 98 2 3 5 2 1 2 98 1 P 3 3 12 2006 998 998 998 3 2 15 152 15202 98 98 98 15202012008
15 152 15202 1 2 8 13910 5 1 3 5 2 10 1 98 998 2 98 998 1 98 998 9998 98 1 4 5 2 1 2 98 98 98 98 98 98 9998 998 998 998 4 2 15 152 15202 98 98 98 15202012008
15 152 15202 1 2 8 13910 7 1 1 1 2 70 1 98 998 2 98 998 1 98 998 9998 98 2 2 5 2 1 2 98 6 98 7 7 6 1994 998 998 998 2 2 15 152 15202 98 98 98 15202012008
15 152 15202 1 2 8 13910 7 1 2 5 1 44 1 98 998 2 98 998 1 98 998 9998 98 2 5 5 2 1 2 98 7 98 98 98 98 9998 998 998 998 5 2 15 152 15202 98 98 98 15202012008
15 152 15202 1 2 8 13910 8 1 1 1 1 58 1 98 998 2 98 998 3 98 998 2004 2 2 4 5 2 1 2 98 6 98 98 98 98 9998 998 998 604 4 2 15 152 15202 98 98 98 15202012008
15 152 15202 1 2 8 13910 8 1 2 2 2 59 1 98 998 2 98 998 3 98 998 2004 2 2 2 5 2 1 2 98 6 98 3 3 7 1999 998 998 604 2 2 15 152 15202 98 98 98 15202012008
15 152 15202 1 2 8 13910 19 1 1 1 1 58 99 99 999 99 99 999 99 99 999 9999 99 99 99 99 99 99 99 99 99 99 98 98 98 9998 999 999 999 99 99 15 152 15202 99 99 99 15202012008
15 152 15202 1 2 8 13910 21 1 1 1 1 53 1 98 998 2 98 998 1 98 998 9998 98 2 8 5 1 1 2 98 1 H 98 98 98 9998 998 998 998 8 2 15 152 15202 98 98 98 15202012008
15 152 15202 1 2 8 13910 21 1 2 2 2 46 1 98 998 2 98 998 1 98 998 9998 98 2 3 5 2 1 2 98 6 98 3 3 2 1990 998 998 998 3 2 15 152 15202 98 98 98 15202012008
15 152 15202 1 2 8 13910 22 1 1 1 2 73 1 98 998 2 98 998 1 98 998 9998 98 3 98 98 98 1 2 98 6 98 6 5 3 1979 998 998 998 0 2 15 152 15202 98 98 98 15202012008
15 152 15202 1 2 8 13910 30 1 1 1 1 57 1 98 998 2 98 998 2 997 998 9998 98 2 3 5 2 1 2 98 6 98 98 98 98 9998 998 998 998 3 2 15 152 15202 98 98 997 15202012008
15 152 15202 1 2 12 8394 3 1 1 2 2 64 1 98 998 2 98 998 3 98 998 1974 4 3 98 98 98 1 2 98 1 A 12 10 99 9999 998 998 604 0 2 15 152 15202 98 98 98 15202012012
15 152 15202 1 2 12 8394 3 1 2 1 1 74 2 98 998 2 98 998 1 98 998 9998 98 3 98 98 98 1 2 98 99 99 98 98 98 9998 998 998 998 0 2 15 152 15202 98 98 98 15202012012
15 152 15202 1 2 12 8394 3 1 3 5 2 38 1 98 998 2 98 998 1 98 998 9998 98 2 8 5 1 1 2 98 2 A 0 98 98 9998 998 998 998 8 2 15 152 15202 98 98 98 15202012012
15 152 15202 1 2 12 8394 3 1 4 14 1 38 99 99 999 99 99 999 99 99 999 9999 99 99 99 99 99 99 99 99 8 98 98 98 98 9998 999 999 999 99 99 15 152 15202 99 99 99 15202012012
15 152 15202 1 2 12 8394 9 1 1 1 2 79 1 98 998 2 98 998 1 98 998 9998 98 3 98 98 98 1 2 98 8 98 2 2 99 9999 998 998 998 0 2 15 152 15202 98 98 98 15202012012
15 152 15202 1 2 12 8394 19 1 1 1 1 46 99 99 999 99 99 999 99 99 999 9999 99 99 99 99 99 99 99 99 99 99 98 98 98 9998 999 999 999 99 99 15 152 15202 99 99 99 15202012012
15 152 15202 1 2 12 8394 20 1 1 1 2 58 1 98 998 2 98 998 1 98 998 9998 98 2 8 5 1 1 2 98 1 A 3 3 7 1982 998 998 998 8 2 15 152 15202 98 98 98 15202012012
15 152 15202 1 2 12 8394 21 1 1 1 2 45 1 98 998 6 98 998 2 997 998 9998 98 2 4 5 2 1 2 98 1 A 6 6 2 2007 998 68 998 4 2 15 152 15202 98 98 997 15202012012
15 152 15202 1 2 12 8394 21 1 2 5 2 10 1 98 998 6 98 998 2 3201 998 9998 98 1 4 5 2 1 2 98 98 98 98 98 98 9998 998 68 998 4 2 15 152 15202 98 98 3201 15202012012
15 152 15202 1 2 12 8394 24 1 1 1 1 67 1 98 998 2 98 998 1 98 998 9998 98 3 98 98 98 1 2 98 8 98 98 98 98 9998 998 998 998 0 2 15 152 15202 98 98 98 15202012012
15 152 15202 1 2 12 8394 24 1 2 2 2 53 1 98 998 2 98 998 3 98 998 9999 99 3 98 98 98 1 2 98 8 98 0 98 98 9998 998 998 604 0 2 15 152 15202 98 98 98 15202012012
15 152 15202 1 2 12 8394 27 1 1 1 1 48 1 98 998 2 98 998 1 98 998 9998 98 2 4 7 1 1 2 98 8 98 98 98 98 9998 998 998 998 12 2 15 152 15202 98 98 98 15202012012
15 152 15202 1 2 12 8394 31 1 1 1 1 49 1 98 998 4 98 998 3 98 998 2001 2 2 8 5 1 1 2 98 1 A 98 98 98 9998 998 604 604 8 2 15 152 15202 98 98 98 15202012012
15 152 15202 1 2 12 8394 42 1 1 1 1 46 1 98 998 2 98 998 3 98 998 1992 3 2 8 5 1 1 2 98 2 A 98 98 98 9998 998 998 604 8 2 15 152 15202 98 98 98 15202012012
15 152 15202 1 2 12 8394 42 1 2 2 2 24 1 98 998 6 98 998 5 98 998 2013 1 2 7 5 2 1 2 98 6 98 2 2 6 2016 998 68 68 7 2 15 152 15202 98 98 98 15202012012
15 152 15202 1 2 12 8394 42 1 3 6 2 2 1 98 998 1 98 998 1 98 998 9998 98 3 98 98 98 1 2 98 98 98 98 98 98 9998 998 998 998 0 2 15 152 15202 98 98 98 15202012012
15 152 15202 1 2 12 8394 42 1 4 5 1 0 1 98 998 1 98 998 2 15101 998 9998 98 99 99 99 99 1 2 98 98 98 98 98 98 9998 998 998 998 99 2 15 152 15202 98 98 15101 15202012012
15 152 15202 1 2 12 8394 42 1 5 5 2 13 1 98 998 2 98 998 3 98 998 9999 99 1 7 5 2 1 2 98 98 98 98 98 98 9998 998 998 604 7 2 15 152 15202 98 98 98 15202012012
15 152 15202 1 2 12 8394 42 1 6 5 1 6 1 98 998 2 98 998 2 15101 998 9998 98 1 0 3 1 1 2 98 98 98 98 98 98 9998 998 998 998 0 2 15 152 15202 98 98 15101 15202012012
15 152 15202 1 2 15 4094 2 1 1 1 1 41 1 98 998 2 98 998 1 98 998 9998 98 2 4 12 1 1 2 98 1 O 98 98 98 9998 998 998 998 16 2 15 152 15202 98 98 98 15202012015
15 152 15202 1 2 15 4094 8 1 1 17 1 70 2 98 998 2 98 998 1 98 998 9998 98 3 98 98 98 1 2 98 7 98 98 98 98 9998 998 998 998 0 2 15 152 15202 98 98 98 15202012015
15 152 15202 1 2 15 4094 8 1 2 17 1 47 2 98 998 3 15101 998 2 8101 998 9998 98 2 4 8 1 1 2 98 1 Z 98 98 98 9998 998 998 998 12 2 15 152 15202 98 15101 8101 15202012015
15 152 15202 1 2 15 4094 8 1 3 17 1 19 2 98 998 3 15101 998 2 15101 998 9998 98 1 99 7 99 1 2 98 1 I 98 98 98 9998 998 998 998 99 2 15 152 15202 98 15101 15101 15202012015
15 152 15202 1 2 15 4094 8 1 4 17 1 43 2 98 998 3 4302 998 2 8101 998 9998 98 99 4 8 1 1 2 98 1 N 98 98 98 9998 998 998 998 12 2 15 152 15202 98 4302 8101 15202012015
15 152 15202 1 2 15 4094 8 1 5 17 2 35 2 98 998 6 98 998 5 98 998 2016 1 2 8 5 1 1 2 98 1 I 2 2 3 2007 998 68 68 8 2 15 152 15202 98 98 98 15202012015
15 152 15202 1 2 15 4094 8 1 6 17 1 36 3 13123 998 3 13123 998 2 12101 998 9998 98 2 5 12 1 2 98 98 1 J 98 98 98 9998 998 998 998 17 98 15 152 15202 13123 13123 12101 15202012015
15 152 15202 1 2 15 4094 8 1 7 17 2 25 2 98 998 3 15101 998 2 15101 998 9998 98 2 5 12 1 1 2 98 1 Q 1 1 12 2011 998 998 998 17 2 15 152 15202 98 15101 15101 15202012015
15 152 15202 1 2 15 4094 9 1 1 1 1 72 1 98 998 2 98 998 1 98 998 9998 98 2 1 5 2 1 2 98 1 G 98 98 98 9998 998 998 998 1 2 15 152 15202 98 98 98 15202012015
15 152 15202 1 2 15 4094 12 1 1 1 1 21 1 98 998 3 15101 998 2 15101 998 9998 98 2 4 8 1 1 2 98 1 N 98 98 98 9998 998 998 998 12 2 15 152 15202 98 15101 15101 15202012015
15 152 15202 1 2 15 4094 15 1 1 1 1 61 1 98 998 2 98 998 1 98 998 9998 98 2 3 7 2 1 2 98 4 98 98 98 98 9998 998 998 998 11 2 15 152 15202 98 98 98 15202012015
15 152 15202 1 2 15 4094 15 1 2 5 2 31 1 98 998 3 15101 998 1 98 998 9998 98 2 4 12 1 1 2 98 1 P 1 1 10 2007 998 998 998 16 2 15 152 15202 98 15101 98 15202012015
15 152 15202 1 2 15 4094 16 1 1 1 1 34 1 98 998 3 15101 998 1 98 998 9998 98 2 5 12 1 1 2 98 1 O 98 98 98 9998 998 998 998 17 2 15 152 15202 98 15101 98 15202012015
unique(tabla_con_clave$AREA)
## [1] 2 1

Despleguemos los códigos de regiones de nuestra tabla:

regiones <- unique(tabla_con_clave$REGION)
regiones
##  [1] 15 14 13 12 11 10  9 16  8  7  6  5  4  3  2  1

Hagamos un subset con la 04 y con la zona = 2:

tabla_con_clave <- filter(tabla_con_clave, tabla_con_clave$REGION == 4) 
tabla_con_clave <- filter(tabla_con_clave, tabla_con_clave$AREA== 2) 

1.2 Cálculo de frecuencias

tabla_con_clave_f <- tabla_con_clave[,-c(1,2,4,5,6,7,8,9,10,11,13,14,15,16,17,18,19,20),drop=FALSE]
names(tabla_con_clave_f)[9] <- "Nivel del curso más alto aprobado"
# Ahora filtramos por Nivel del curso más alto aprobado = 11.
tabla_con_clave_ff <- filter(tabla_con_clave_f, tabla_con_clave_f$`Nivel del curso más alto aprobado` == 12)
# Determinamos las frecuencias por zona:
b <- tabla_con_clave_ff$clave
c <- tabla_con_clave_ff$`Nivel del curso más alto aprobado`
d <- tabla_con_clave_ff$COMUNA
cross_tab =  xtabs( ~ unlist(b) + unlist(c)+ unlist(d))
tabla <- as.data.frame(cross_tab)
d <-tabla[!(tabla$Freq == 0),]
names(d)[1] <- "zona" 
d$anio <- "2017"

Veamos los primeros 100 registros:

r3_100 <- d[c(1:100),]
kbl(r3_100) %>%
  kable_styling(bootstrap_options = c("striped", "hover")) %>%
  kable_paper() %>%
  scroll_box(width = "100%", height = "300px")
zona unlist.c. unlist.d. Freq anio
1 4101022001 12 4101 200 2017
2 4101052007 12 4101 31 2017
3 4101062001 12 4101 97 2017
4 4101062004 12 4101 215 2017
5 4101062006 12 4101 54 2017
6 4101062024 12 4101 54 2017
7 4101062030 12 4101 7 2017
8 4101062049 12 4101 37 2017
9 4101062901 12 4101 22 2017
10 4101072002 12 4101 106 2017
11 4101072027 12 4101 76 2017
12 4101072029 12 4101 1 2017
13 4101072051 12 4101 47 2017
14 4101072054 12 4101 6 2017
15 4101082011 12 4101 8 2017
16 4101082018 12 4101 46 2017
17 4101082021 12 4101 62 2017
18 4101082022 12 4101 1 2017
19 4101082023 12 4101 74 2017
20 4101082029 12 4101 10 2017
21 4101082043 12 4101 32 2017
22 4101082051 12 4101 8 2017
23 4101082052 12 4101 12 2017
24 4101082901 12 4101 6 2017
25 4101092003 12 4101 150 2017
26 4101092009 12 4101 2 2017
27 4101092034 12 4101 83 2017
28 4101092038 12 4101 4 2017
29 4101092039 12 4101 5 2017
30 4101102003 12 4101 17 2017
31 4101102013 12 4101 93 2017
32 4101102015 12 4101 46 2017
33 4101102020 12 4101 276 2017
34 4101102032 12 4101 1 2017
35 4101102035 12 4101 2 2017
36 4101112010 12 4101 1 2017
37 4101122010 12 4101 2 2017
38 4101122901 12 4101 1 2017
39 4101132025 12 4101 35 2017
40 4101132032 12 4101 17 2017
41 4101132046 12 4101 1 2017
42 4101132901 12 4101 4 2017
43 4101142012 12 4101 5 2017
44 4101142014 12 4101 62 2017
45 4101142019 12 4101 3 2017
46 4101142036 12 4101 16 2017
47 4101142040 12 4101 9 2017
48 4101142056 12 4101 140 2017
49 4101142057 12 4101 9 2017
50 4101142901 12 4101 69 2017
51 4101172030 12 4101 1 2017
555 4102062009 12 4102 28 2017
556 4102062014 12 4102 3 2017
557 4102062024 12 4102 343 2017
558 4102062901 12 4102 29 2017
559 4102072002 12 4102 74 2017
560 4102072011 12 4102 29 2017
561 4102072021 12 4102 9 2017
562 4102072023 12 4102 14 2017
563 4102072024 12 4102 96 2017
564 4102082004 12 4102 46 2017
565 4102082007 12 4102 6 2017
566 4102082016 12 4102 1 2017
567 4102082020 12 4102 4 2017
568 4102082032 12 4102 28 2017
569 4102082901 12 4102 11 2017
570 4102092026 12 4102 7 2017
571 4102112017 12 4102 52 2017
572 4102112025 12 4102 20 2017
573 4102112029 12 4102 69 2017
574 4102112901 12 4102 3 2017
575 4102122018 12 4102 5 2017
576 4102132001 12 4102 1 2017
577 4102142012 12 4102 6 2017
578 4102152012 12 4102 3 2017
579 4102152030 12 4102 11 2017
580 4102162013 12 4102 32 2017
581 4102162901 12 4102 2 2017
582 4102182004 12 4102 1 2017
1086 4103012011 12 4103 1 2017
1087 4103012014 12 4103 5 2017
1088 4103012901 12 4103 5 2017
1089 4103032005 12 4103 26 2017
1090 4103032013 12 4103 3 2017
1091 4103032901 12 4103 1 2017
1595 4104012013 12 4104 2 2017
1596 4104022002 12 4104 22 2017
1597 4104022006 12 4104 2 2017
1598 4104022901 12 4104 1 2017
1599 4104032014 12 4104 1 2017
1600 4104042003 12 4104 6 2017
1601 4104042028 12 4104 1 2017
1602 4104042901 12 4104 2 2017
1603 4104052004 12 4104 28 2017
1604 4104052017 12 4104 13 2017
1605 4104052023 12 4104 10 2017
1606 4104062004 12 4104 1 2017
1607 4104062901 12 4104 2 2017
1608 4104072015 12 4104 7 2017
1609 4104072018 12 4104 2 2017

Agregamos un cero a los códigos comunales de cuatro dígitos:

codigos <- d$unlist.d.
rango <- seq(1:nrow(d))
cadena <- paste("0",codigos[rango], sep = "")
cadena <- substr(cadena,(nchar(cadena)[rango])-(4),6)
codigos <- as.data.frame(codigos)
cadena <- as.data.frame(cadena)
comuna_corr <- cbind(d,cadena)
comuna_corr <- comuna_corr[,-c(2,3),drop=FALSE]
names(comuna_corr)[4] <- "código" 
r3_100 <- comuna_corr[c(1:100),]
kbl(r3_100) %>%
  kable_styling(bootstrap_options = c("striped", "hover")) %>%
  kable_paper() %>%
  scroll_box(width = "100%", height = "300px")
zona Freq anio código
1 4101022001 200 2017 04101
2 4101052007 31 2017 04101
3 4101062001 97 2017 04101
4 4101062004 215 2017 04101
5 4101062006 54 2017 04101
6 4101062024 54 2017 04101
7 4101062030 7 2017 04101
8 4101062049 37 2017 04101
9 4101062901 22 2017 04101
10 4101072002 106 2017 04101
11 4101072027 76 2017 04101
12 4101072029 1 2017 04101
13 4101072051 47 2017 04101
14 4101072054 6 2017 04101
15 4101082011 8 2017 04101
16 4101082018 46 2017 04101
17 4101082021 62 2017 04101
18 4101082022 1 2017 04101
19 4101082023 74 2017 04101
20 4101082029 10 2017 04101
21 4101082043 32 2017 04101
22 4101082051 8 2017 04101
23 4101082052 12 2017 04101
24 4101082901 6 2017 04101
25 4101092003 150 2017 04101
26 4101092009 2 2017 04101
27 4101092034 83 2017 04101
28 4101092038 4 2017 04101
29 4101092039 5 2017 04101
30 4101102003 17 2017 04101
31 4101102013 93 2017 04101
32 4101102015 46 2017 04101
33 4101102020 276 2017 04101
34 4101102032 1 2017 04101
35 4101102035 2 2017 04101
36 4101112010 1 2017 04101
37 4101122010 2 2017 04101
38 4101122901 1 2017 04101
39 4101132025 35 2017 04101
40 4101132032 17 2017 04101
41 4101132046 1 2017 04101
42 4101132901 4 2017 04101
43 4101142012 5 2017 04101
44 4101142014 62 2017 04101
45 4101142019 3 2017 04101
46 4101142036 16 2017 04101
47 4101142040 9 2017 04101
48 4101142056 140 2017 04101
49 4101142057 9 2017 04101
50 4101142901 69 2017 04101
51 4101172030 1 2017 04101
555 4102062009 28 2017 04102
556 4102062014 3 2017 04102
557 4102062024 343 2017 04102
558 4102062901 29 2017 04102
559 4102072002 74 2017 04102
560 4102072011 29 2017 04102
561 4102072021 9 2017 04102
562 4102072023 14 2017 04102
563 4102072024 96 2017 04102
564 4102082004 46 2017 04102
565 4102082007 6 2017 04102
566 4102082016 1 2017 04102
567 4102082020 4 2017 04102
568 4102082032 28 2017 04102
569 4102082901 11 2017 04102
570 4102092026 7 2017 04102
571 4102112017 52 2017 04102
572 4102112025 20 2017 04102
573 4102112029 69 2017 04102
574 4102112901 3 2017 04102
575 4102122018 5 2017 04102
576 4102132001 1 2017 04102
577 4102142012 6 2017 04102
578 4102152012 3 2017 04102
579 4102152030 11 2017 04102
580 4102162013 32 2017 04102
581 4102162901 2 2017 04102
582 4102182004 1 2017 04102
1086 4103012011 1 2017 04103
1087 4103012014 5 2017 04103
1088 4103012901 5 2017 04103
1089 4103032005 26 2017 04103
1090 4103032013 3 2017 04103
1091 4103032901 1 2017 04103
1595 4104012013 2 2017 04104
1596 4104022002 22 2017 04104
1597 4104022006 2 2017 04104
1598 4104022901 1 2017 04104
1599 4104032014 1 2017 04104
1600 4104042003 6 2017 04104
1601 4104042028 1 2017 04104
1602 4104042901 2 2017 04104
1603 4104052004 28 2017 04104
1604 4104052017 13 2017 04104
1605 4104052023 10 2017 04104
1606 4104062004 1 2017 04104
1607 4104062901 2 2017 04104
1608 4104072015 7 2017 04104
1609 4104072018 2 2017 04104


2 Variable CASEN

2.1 Tabla de ingresos expandidos

Hemos calculado ya éste valor como conclusión del punto 1.1 de aquí

h_y_m_2017_censo <- readRDS("../corre_ing_exp-censo_casen/Ingresos_expandidos_rural_17.rds")
tablamadre <- head(h_y_m_2017_censo,50)
kbl(tablamadre) %>%
  kable_styling(bootstrap_options = c("striped", "hover")) %>%
  kable_paper() %>%
  scroll_box(width = "100%", height = "300px")
código comuna.x promedio_i año personas Ingresos_expandidos
01101 Iquique 272529.7 2017 191468 52180713221
01401 Pozo Almonte 243272.4 2017 15711 3822052676
01402 Camiña 226831.0 2017 1250 283538750
01404 Huara 236599.7 2017 2730 645917134
01405 Pica 269198.0 2017 9296 2502464414
02103 Sierra Gorda 322997.9 2017 10186 3290056742
02104 Taltal 288653.8 2017 13317 3844002134
02201 Calama 238080.9 2017 165731 39457387800
02203 San Pedro de Atacama 271472.6 2017 10996 2985112297
02301 Tocopilla 166115.9 2017 25186 4183793832
03101 Copiapó 251396.0 2017 153937 38699138722
03103 Tierra Amarilla 287819.4 2017 14019 4034940816
03202 Diego de Almagro 326439.0 2017 13925 4545663075
03301 Vallenar 217644.6 2017 51917 11299454698
03302 Alto del Carmen 196109.9 2017 5299 1039186477
03303 Freirina 202463.8 2017 7041 1425547554
03304 Huasco 205839.6 2017 10149 2089066548
04101 La Serena 200287.4 2017 221054 44274327972
04102 Coquimbo 206027.8 2017 227730 46918711304
04103 Andacollo 217096.4 2017 11044 2397612293
04104 La Higuera 231674.2 2017 4241 982530309
04105 Paiguano 174868.5 2017 4497 786383423
04106 Vicuña 169077.1 2017 27771 4695441470
04201 Illapel 165639.6 2017 30848 5109649759
04202 Canela 171370.3 2017 9093 1558270441
04203 Los Vilos 173238.5 2017 21382 3704185607
04204 Salamanca 193602.0 2017 29347 5681637894
04301 Ovalle 230819.8 2017 111272 25683781418
04302 Combarbalá 172709.2 2017 13322 2300832587
04303 Monte Patria 189761.6 2017 30751 5835357638
04304 Punitaqui 165862.0 2017 10956 1817183694
04305 Río Hurtado 182027.2 2017 4278 778712384
05101 Valparaíso 251998.5 2017 296655 74756602991
05102 Casablanca 252317.7 2017 26867 6779018483
05105 Puchuncaví 231606.0 2017 18546 4295363979
05107 Quintero 285125.8 2017 31923 9102071069
05301 Los Andes 280548.0 2017 66708 18714795984
05302 Calle Larga 234044.6 2017 14832 3471349123
05303 Rinconada 246136.9 2017 10207 2512319225
05304 San Esteban 211907.3 2017 18855 3995512770
05401 La Ligua 172675.9 2017 35390 6111000517
05402 Cabildo 212985.0 2017 19388 4129354103
05404 Petorca 270139.8 2017 9826 2654393853
05405 Zapallar 235661.4 2017 7339 1729518700
05501 Quillota 212067.6 2017 90517 19195726144
05502 Calera 226906.2 2017 50554 11471016698
05503 Hijuelas 215402.0 2017 17988 3874650405
05504 La Cruz 243333.4 2017 22098 5377180726
05506 Nogales 219800.7 2017 22120 4861992055
05601 San Antonio 230261.5 2017 91350 21034388728

3 Unión Censo-Casen

Integramos a la tabla censal de frecuencias la tabla de ingresos expandidos de la Casen.

comunas_con_ing_exp = merge( x = comuna_corr, y = h_y_m_2017_censo, by = "código", all.x = TRUE)
comunas_con_ing_exp <-comunas_con_ing_exp[!(is.na(comunas_con_ing_exp$Ingresos_expandidos)),]
r3_100 <- comunas_con_ing_exp[c(1:100),]
kbl(r3_100) %>%
  kable_styling(bootstrap_options = c("striped", "hover")) %>%
  kable_paper() %>%
  scroll_box(width = "100%", height = "300px")
código zona Freq anio comuna.x promedio_i año personas Ingresos_expandidos
04101 4101022001 200 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101052007 31 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101062001 97 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101062004 215 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101062006 54 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101062024 54 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101062030 7 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101062049 37 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101062901 22 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101072002 106 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101072027 76 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101072029 1 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101072051 47 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101072054 6 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101082011 8 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101082018 46 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101082021 62 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101082022 1 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101082023 74 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101082029 10 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101082043 32 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101082051 8 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101082052 12 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101082901 6 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101092003 150 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101092009 2 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101092034 83 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101092038 4 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101092039 5 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101102003 17 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101102013 93 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101102015 46 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101102020 276 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101102032 1 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101102035 2 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101112010 1 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101122010 2 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101122901 1 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101132025 35 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101132032 17 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101132046 1 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101132901 4 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101142012 5 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101142014 62 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101142019 3 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101142036 16 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101142040 9 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101142056 140 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101142057 9 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101142901 69 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101172030 1 2017 La Serena 200287.4 2017 221054 44274327972
04102 4102062009 28 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102062014 3 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102062024 343 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102062901 29 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102072002 74 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102072011 29 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102072021 9 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102072023 14 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102072024 96 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102082004 46 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102082007 6 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102082016 1 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102082020 4 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102082032 28 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102082901 11 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102092026 7 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102112017 52 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102112025 20 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102112029 69 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102112901 3 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102122018 5 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102132001 1 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102142012 6 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102152012 3 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102152030 11 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102162013 32 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102162901 2 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102182004 1 2017 Coquimbo 206027.8 2017 227730 46918711304
04103 4103012011 1 2017 Andacollo 217096.4 2017 11044 2397612293
04103 4103012014 5 2017 Andacollo 217096.4 2017 11044 2397612293
04103 4103012901 5 2017 Andacollo 217096.4 2017 11044 2397612293
04103 4103032005 26 2017 Andacollo 217096.4 2017 11044 2397612293
04103 4103032013 3 2017 Andacollo 217096.4 2017 11044 2397612293
04103 4103032901 1 2017 Andacollo 217096.4 2017 11044 2397612293
04104 4104012013 2 2017 La Higuera 231674.2 2017 4241 982530309
04104 4104022002 22 2017 La Higuera 231674.2 2017 4241 982530309
04104 4104022006 2 2017 La Higuera 231674.2 2017 4241 982530309
04104 4104022901 1 2017 La Higuera 231674.2 2017 4241 982530309
04104 4104032014 1 2017 La Higuera 231674.2 2017 4241 982530309
04104 4104042003 6 2017 La Higuera 231674.2 2017 4241 982530309
04104 4104042028 1 2017 La Higuera 231674.2 2017 4241 982530309
04104 4104042901 2 2017 La Higuera 231674.2 2017 4241 982530309
04104 4104052004 28 2017 La Higuera 231674.2 2017 4241 982530309
04104 4104052017 13 2017 La Higuera 231674.2 2017 4241 982530309
04104 4104052023 10 2017 La Higuera 231674.2 2017 4241 982530309
04104 4104062004 1 2017 La Higuera 231674.2 2017 4241 982530309
04104 4104062901 2 2017 La Higuera 231674.2 2017 4241 982530309
04104 4104072015 7 2017 La Higuera 231674.2 2017 4241 982530309
04104 4104072018 2 2017 La Higuera 231674.2 2017 4241 982530309


4 Proporción poblacional zonal respecto a la comunal

Del censo obtenemos la cantidad de población a nivel de zona y estimamos su proporción a nivel comunal. Ya hemos calculado ésta proporción aquí.

prop_pob <- readRDS("../tabla_de_prop_pob.rds")
names(prop_pob)[1] <- "zona"
names(prop_pob)[3] <- "p_poblacional" 

Veamos los 100 primeros registros:

r3_100 <- prop_pob[c(1:100),]
kbl(r3_100) %>%
  kable_styling(bootstrap_options = c("striped", "hover")) %>%
  kable_paper() %>%
  scroll_box(width = "100%", height = "300px")
zona Freq p_poblacional código
1101011001 2491 0.0130100 01101
1101011002 1475 0.0077036 01101
1101021001 1003 0.0052385 01101
1101021002 54 0.0002820 01101
1101021003 2895 0.0151200 01101
1101021004 2398 0.0125243 01101
1101021005 4525 0.0236332 01101
1101031001 2725 0.0142321 01101
1101031002 3554 0.0185618 01101
1101031003 5246 0.0273988 01101
1101031004 3389 0.0177001 01101
1101041001 1800 0.0094010 01101
1101041002 2538 0.0132555 01101
1101041003 3855 0.0201339 01101
1101041004 5663 0.0295767 01101
1101041005 4162 0.0217373 01101
1101041006 2689 0.0140441 01101
1101051001 3296 0.0172144 01101
1101051002 4465 0.0233198 01101
1101051003 4656 0.0243174 01101
1101051004 2097 0.0109522 01101
1101051005 3569 0.0186402 01101
1101051006 2741 0.0143157 01101
1101061001 1625 0.0084871 01101
1101061002 4767 0.0248971 01101
1101061003 4826 0.0252053 01101
1101061004 4077 0.0212934 01101
1101061005 2166 0.0113126 01101
1101071001 2324 0.0121378 01101
1101071002 2801 0.0146291 01101
1101071003 3829 0.0199981 01101
1101071004 1987 0.0103777 01101
1101081001 5133 0.0268087 01101
1101081002 3233 0.0168853 01101
1101081003 2122 0.0110828 01101
1101081004 2392 0.0124929 01101
1101092001 57 0.0002977 01101
1101092004 247 0.0012900 01101
1101092005 76 0.0003969 01101
1101092006 603 0.0031494 01101
1101092007 84 0.0004387 01101
1101092010 398 0.0020787 01101
1101092012 58 0.0003029 01101
1101092014 23 0.0001201 01101
1101092016 20 0.0001045 01101
1101092017 8 0.0000418 01101
1101092018 74 0.0003865 01101
1101092019 25 0.0001306 01101
1101092021 177 0.0009244 01101
1101092022 23 0.0001201 01101
1101092023 288 0.0015042 01101
1101092024 14 0.0000731 01101
1101092901 30 0.0001567 01101
1101101001 2672 0.0139553 01101
1101101002 4398 0.0229699 01101
1101101003 4524 0.0236280 01101
1101101004 3544 0.0185096 01101
1101101005 4911 0.0256492 01101
1101101006 3688 0.0192617 01101
1101111001 3886 0.0202958 01101
1101111002 2312 0.0120751 01101
1101111003 4874 0.0254560 01101
1101111004 4543 0.0237272 01101
1101111005 4331 0.0226200 01101
1101111006 3253 0.0169898 01101
1101111007 4639 0.0242286 01101
1101111008 4881 0.0254925 01101
1101111009 5006 0.0261454 01101
1101111010 366 0.0019115 01101
1101111011 4351 0.0227244 01101
1101111012 2926 0.0152819 01101
1101111013 3390 0.0177053 01101
1101111014 2940 0.0153550 01101
1101112003 33 0.0001724 01101
1101112013 104 0.0005432 01101
1101112019 34 0.0001776 01101
1101112025 21 0.0001097 01101
1101112901 6 0.0000313 01101
1101991999 1062 0.0055466 01101
1107011001 4104 0.0378685 01107
1107011002 4360 0.0402307 01107
1107011003 8549 0.0788835 01107
1107012003 3 0.0000277 01107
1107012901 17 0.0001569 01107
1107021001 6701 0.0618316 01107
1107021002 3971 0.0366413 01107
1107021003 6349 0.0585836 01107
1107021004 5125 0.0472895 01107
1107021005 4451 0.0410704 01107
1107021006 3864 0.0356540 01107
1107021007 5235 0.0483045 01107
1107021008 4566 0.0421315 01107
1107031001 4195 0.0387082 01107
1107031002 7099 0.0655040 01107
1107031003 4720 0.0435525 01107
1107032005 38 0.0003506 01107
1107032006 2399 0.0221361 01107
1107032008 4 0.0000369 01107
1107041001 3630 0.0334948 01107
1107041002 5358 0.0494394 01107


5 Ingreso medio

Deseamos el valor del ingreso promedio a nivel comunal, pero expandido a nivel zonal. Ésta información está contenida en el campo promedio_i de la tabla obtenida en el punto 3.

r3_100 <- comunas_con_ing_exp[c(1:100),]
kbl(r3_100) %>%
  kable_styling(bootstrap_options = c("striped", "hover")) %>%
  kable_paper() %>%
  scroll_box(width = "100%", height = "300px")
código zona Freq anio comuna.x promedio_i año personas Ingresos_expandidos
04101 4101022001 200 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101052007 31 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101062001 97 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101062004 215 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101062006 54 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101062024 54 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101062030 7 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101062049 37 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101062901 22 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101072002 106 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101072027 76 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101072029 1 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101072051 47 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101072054 6 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101082011 8 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101082018 46 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101082021 62 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101082022 1 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101082023 74 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101082029 10 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101082043 32 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101082051 8 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101082052 12 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101082901 6 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101092003 150 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101092009 2 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101092034 83 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101092038 4 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101092039 5 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101102003 17 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101102013 93 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101102015 46 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101102020 276 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101102032 1 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101102035 2 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101112010 1 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101122010 2 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101122901 1 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101132025 35 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101132032 17 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101132046 1 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101132901 4 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101142012 5 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101142014 62 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101142019 3 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101142036 16 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101142040 9 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101142056 140 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101142057 9 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101142901 69 2017 La Serena 200287.4 2017 221054 44274327972
04101 4101172030 1 2017 La Serena 200287.4 2017 221054 44274327972
04102 4102062009 28 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102062014 3 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102062024 343 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102062901 29 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102072002 74 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102072011 29 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102072021 9 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102072023 14 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102072024 96 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102082004 46 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102082007 6 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102082016 1 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102082020 4 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102082032 28 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102082901 11 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102092026 7 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102112017 52 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102112025 20 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102112029 69 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102112901 3 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102122018 5 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102132001 1 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102142012 6 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102152012 3 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102152030 11 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102162013 32 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102162901 2 2017 Coquimbo 206027.8 2017 227730 46918711304
04102 4102182004 1 2017 Coquimbo 206027.8 2017 227730 46918711304
04103 4103012011 1 2017 Andacollo 217096.4 2017 11044 2397612293
04103 4103012014 5 2017 Andacollo 217096.4 2017 11044 2397612293
04103 4103012901 5 2017 Andacollo 217096.4 2017 11044 2397612293
04103 4103032005 26 2017 Andacollo 217096.4 2017 11044 2397612293
04103 4103032013 3 2017 Andacollo 217096.4 2017 11044 2397612293
04103 4103032901 1 2017 Andacollo 217096.4 2017 11044 2397612293
04104 4104012013 2 2017 La Higuera 231674.2 2017 4241 982530309
04104 4104022002 22 2017 La Higuera 231674.2 2017 4241 982530309
04104 4104022006 2 2017 La Higuera 231674.2 2017 4241 982530309
04104 4104022901 1 2017 La Higuera 231674.2 2017 4241 982530309
04104 4104032014 1 2017 La Higuera 231674.2 2017 4241 982530309
04104 4104042003 6 2017 La Higuera 231674.2 2017 4241 982530309
04104 4104042028 1 2017 La Higuera 231674.2 2017 4241 982530309
04104 4104042901 2 2017 La Higuera 231674.2 2017 4241 982530309
04104 4104052004 28 2017 La Higuera 231674.2 2017 4241 982530309
04104 4104052017 13 2017 La Higuera 231674.2 2017 4241 982530309
04104 4104052023 10 2017 La Higuera 231674.2 2017 4241 982530309
04104 4104062004 1 2017 La Higuera 231674.2 2017 4241 982530309
04104 4104062901 2 2017 La Higuera 231674.2 2017 4241 982530309
04104 4104072015 7 2017 La Higuera 231674.2 2017 4241 982530309
04104 4104072018 2 2017 La Higuera 231674.2 2017 4241 982530309


6 Ingreso promedio expandido por zona (multi_pob)

En éste momento vamos a construir nuestra variable dependiente de regresión aplicando la siguiente fórmula:

\[ multi\_pob = promedio\_i \cdot personas \cdot p\_poblacional \]

Para ello integramos a la tabla de ingresos expandidos a nivel zonal (punto 3) la tabla de proporciones poblacionales zonales respecto al total comunal (punto 4) :

h_y_m_comuna_corr_01 = merge( x = comunas_con_ing_exp, y = prop_pob, by = "zona", all.x = TRUE)
tablamadre <- head(h_y_m_comuna_corr_01,100)
kbl(tablamadre) %>%
  kable_styling(bootstrap_options = c("striped", "hover")) %>%
  kable_paper() %>%
  scroll_box(width = "100%", height = "300px")
zona código.x Freq.x anio comuna.x promedio_i año personas Ingresos_expandidos Freq.y p_poblacional código.y
4101022001 04101 200 2017 La Serena 200287.4 2017 221054 44274327972 1157 0.0052340 04101
4101052007 04101 31 2017 La Serena 200287.4 2017 221054 44274327972 125 0.0005655 04101
4101062001 04101 97 2017 La Serena 200287.4 2017 221054 44274327972 345 0.0015607 04101
4101062004 04101 215 2017 La Serena 200287.4 2017 221054 44274327972 740 0.0033476 04101
4101062006 04101 54 2017 La Serena 200287.4 2017 221054 44274327972 224 0.0010133 04101
4101062024 04101 54 2017 La Serena 200287.4 2017 221054 44274327972 2392 0.0108209 04101
4101062030 04101 7 2017 La Serena 200287.4 2017 221054 44274327972 41 0.0001855 04101
4101062049 04101 37 2017 La Serena 200287.4 2017 221054 44274327972 115 0.0005202 04101
4101062901 04101 22 2017 La Serena 200287.4 2017 221054 44274327972 284 0.0012848 04101
4101072002 04101 106 2017 La Serena 200287.4 2017 221054 44274327972 394 0.0017824 04101
4101072027 04101 76 2017 La Serena 200287.4 2017 221054 44274327972 461 0.0020855 04101
4101072029 04101 1 2017 La Serena 200287.4 2017 221054 44274327972 119 0.0005383 04101
4101072051 04101 47 2017 La Serena 200287.4 2017 221054 44274327972 179 0.0008098 04101
4101072054 04101 6 2017 La Serena 200287.4 2017 221054 44274327972 114 0.0005157 04101
4101082011 04101 8 2017 La Serena 200287.4 2017 221054 44274327972 304 0.0013752 04101
4101082018 04101 46 2017 La Serena 200287.4 2017 221054 44274327972 348 0.0015743 04101
4101082021 04101 62 2017 La Serena 200287.4 2017 221054 44274327972 748 0.0033838 04101
4101082022 04101 1 2017 La Serena 200287.4 2017 221054 44274327972 13 0.0000588 04101
4101082023 04101 74 2017 La Serena 200287.4 2017 221054 44274327972 733 0.0033159 04101
4101082029 04101 10 2017 La Serena 200287.4 2017 221054 44274327972 140 0.0006333 04101
4101082043 04101 32 2017 La Serena 200287.4 2017 221054 44274327972 692 0.0031305 04101
4101082051 04101 8 2017 La Serena 200287.4 2017 221054 44274327972 36 0.0001629 04101
4101082052 04101 12 2017 La Serena 200287.4 2017 221054 44274327972 52 0.0002352 04101
4101082901 04101 6 2017 La Serena 200287.4 2017 221054 44274327972 37 0.0001674 04101
4101092003 04101 150 2017 La Serena 200287.4 2017 221054 44274327972 740 0.0033476 04101
4101092009 04101 2 2017 La Serena 200287.4 2017 221054 44274327972 144 0.0006514 04101
4101092034 04101 83 2017 La Serena 200287.4 2017 221054 44274327972 742 0.0033566 04101
4101092038 04101 4 2017 La Serena 200287.4 2017 221054 44274327972 329 0.0014883 04101
4101092039 04101 5 2017 La Serena 200287.4 2017 221054 44274327972 63 0.0002850 04101
4101102003 04101 17 2017 La Serena 200287.4 2017 221054 44274327972 70 0.0003167 04101
4101102013 04101 93 2017 La Serena 200287.4 2017 221054 44274327972 1201 0.0054331 04101
4101102015 04101 46 2017 La Serena 200287.4 2017 221054 44274327972 364 0.0016467 04101
4101102020 04101 276 2017 La Serena 200287.4 2017 221054 44274327972 2212 0.0100066 04101
4101102032 04101 1 2017 La Serena 200287.4 2017 221054 44274327972 48 0.0002171 04101
4101102035 04101 2 2017 La Serena 200287.4 2017 221054 44274327972 46 0.0002081 04101
4101112010 04101 1 2017 La Serena 200287.4 2017 221054 44274327972 66 0.0002986 04101
4101122010 04101 2 2017 La Serena 200287.4 2017 221054 44274327972 44 0.0001990 04101
4101122901 04101 1 2017 La Serena 200287.4 2017 221054 44274327972 63 0.0002850 04101
4101132025 04101 35 2017 La Serena 200287.4 2017 221054 44274327972 987 0.0044650 04101
4101132032 04101 17 2017 La Serena 200287.4 2017 221054 44274327972 824 0.0037276 04101
4101132046 04101 1 2017 La Serena 200287.4 2017 221054 44274327972 23 0.0001040 04101
4101132901 04101 4 2017 La Serena 200287.4 2017 221054 44274327972 36 0.0001629 04101
4101142012 04101 5 2017 La Serena 200287.4 2017 221054 44274327972 175 0.0007917 04101
4101142014 04101 62 2017 La Serena 200287.4 2017 221054 44274327972 519 0.0023478 04101
4101142019 04101 3 2017 La Serena 200287.4 2017 221054 44274327972 194 0.0008776 04101
4101142036 04101 16 2017 La Serena 200287.4 2017 221054 44274327972 225 0.0010179 04101
4101142040 04101 9 2017 La Serena 200287.4 2017 221054 44274327972 92 0.0004162 04101
4101142056 04101 140 2017 La Serena 200287.4 2017 221054 44274327972 383 0.0017326 04101
4101142057 04101 9 2017 La Serena 200287.4 2017 221054 44274327972 45 0.0002036 04101
4101142901 04101 69 2017 La Serena 200287.4 2017 221054 44274327972 324 0.0014657 04101
4101172030 04101 1 2017 La Serena 200287.4 2017 221054 44274327972 113 0.0005112 04101
4102062009 04102 28 2017 Coquimbo 206027.8 2017 227730 46918711304 395 0.0017345 04102
4102062014 04102 3 2017 Coquimbo 206027.8 2017 227730 46918711304 128 0.0005621 04102
4102062024 04102 343 2017 Coquimbo 206027.8 2017 227730 46918711304 4341 0.0190620 04102
4102062901 04102 29 2017 Coquimbo 206027.8 2017 227730 46918711304 111 0.0004874 04102
4102072002 04102 74 2017 Coquimbo 206027.8 2017 227730 46918711304 816 0.0035832 04102
4102072011 04102 29 2017 Coquimbo 206027.8 2017 227730 46918711304 156 0.0006850 04102
4102072021 04102 9 2017 Coquimbo 206027.8 2017 227730 46918711304 106 0.0004655 04102
4102072023 04102 14 2017 Coquimbo 206027.8 2017 227730 46918711304 565 0.0024810 04102
4102072024 04102 96 2017 Coquimbo 206027.8 2017 227730 46918711304 1893 0.0083125 04102
4102082004 04102 46 2017 Coquimbo 206027.8 2017 227730 46918711304 296 0.0012998 04102
4102082007 04102 6 2017 Coquimbo 206027.8 2017 227730 46918711304 52 0.0002283 04102
4102082016 04102 1 2017 Coquimbo 206027.8 2017 227730 46918711304 14 0.0000615 04102
4102082020 04102 4 2017 Coquimbo 206027.8 2017 227730 46918711304 8 0.0000351 04102
4102082032 04102 28 2017 Coquimbo 206027.8 2017 227730 46918711304 307 0.0013481 04102
4102082901 04102 11 2017 Coquimbo 206027.8 2017 227730 46918711304 77 0.0003381 04102
4102092026 04102 7 2017 Coquimbo 206027.8 2017 227730 46918711304 40 0.0001756 04102
4102112017 04102 52 2017 Coquimbo 206027.8 2017 227730 46918711304 760 0.0033373 04102
4102112025 04102 20 2017 Coquimbo 206027.8 2017 227730 46918711304 233 0.0010231 04102
4102112029 04102 69 2017 Coquimbo 206027.8 2017 227730 46918711304 1312 0.0057612 04102
4102112901 04102 3 2017 Coquimbo 206027.8 2017 227730 46918711304 45 0.0001976 04102
4102122018 04102 5 2017 Coquimbo 206027.8 2017 227730 46918711304 460 0.0020199 04102
4102132001 04102 1 2017 Coquimbo 206027.8 2017 227730 46918711304 61 0.0002679 04102
4102142012 04102 6 2017 Coquimbo 206027.8 2017 227730 46918711304 288 0.0012647 04102
4102152012 04102 3 2017 Coquimbo 206027.8 2017 227730 46918711304 50 0.0002196 04102
4102152030 04102 11 2017 Coquimbo 206027.8 2017 227730 46918711304 122 0.0005357 04102
4102162013 04102 32 2017 Coquimbo 206027.8 2017 227730 46918711304 252 0.0011066 04102
4102162901 04102 2 2017 Coquimbo 206027.8 2017 227730 46918711304 19 0.0000834 04102
4102182004 04102 1 2017 Coquimbo 206027.8 2017 227730 46918711304 19 0.0000834 04102
4103012011 04103 1 2017 Andacollo 217096.4 2017 11044 2397612293 14 0.0012677 04103
4103012014 04103 5 2017 Andacollo 217096.4 2017 11044 2397612293 55 0.0049801 04103
4103012901 04103 5 2017 Andacollo 217096.4 2017 11044 2397612293 83 0.0075154 04103
4103032005 04103 26 2017 Andacollo 217096.4 2017 11044 2397612293 537 0.0486237 04103
4103032013 04103 3 2017 Andacollo 217096.4 2017 11044 2397612293 72 0.0065194 04103
4103032901 04103 1 2017 Andacollo 217096.4 2017 11044 2397612293 31 0.0028070 04103
4104012013 04104 2 2017 La Higuera 231674.2 2017 4241 982530309 53 0.0124971 04104
4104022002 04104 22 2017 La Higuera 231674.2 2017 4241 982530309 839 0.1978307 04104
4104022006 04104 2 2017 La Higuera 231674.2 2017 4241 982530309 43 0.0101391 04104
4104022901 04104 1 2017 La Higuera 231674.2 2017 4241 982530309 19 0.0044801 04104
4104032014 04104 1 2017 La Higuera 231674.2 2017 4241 982530309 66 0.0155624 04104
4104042003 04104 6 2017 La Higuera 231674.2 2017 4241 982530309 267 0.0629568 04104
4104042028 04104 1 2017 La Higuera 231674.2 2017 4241 982530309 52 0.0122613 04104
4104042901 04104 2 2017 La Higuera 231674.2 2017 4241 982530309 18 0.0042443 04104
4104052004 04104 28 2017 La Higuera 231674.2 2017 4241 982530309 144 0.0339543 04104
4104052017 04104 13 2017 La Higuera 231674.2 2017 4241 982530309 231 0.0544683 04104
4104052023 04104 10 2017 La Higuera 231674.2 2017 4241 982530309 311 0.0733318 04104
4104062004 04104 1 2017 La Higuera 231674.2 2017 4241 982530309 3 0.0007074 04104
4104062901 04104 2 2017 La Higuera 231674.2 2017 4241 982530309 52 0.0122613 04104
4104072015 04104 7 2017 La Higuera 231674.2 2017 4241 982530309 21 0.0049517 04104
4104072018 04104 2 2017 La Higuera 231674.2 2017 4241 982530309 72 0.0169771 04104


Hacemos la multiplicación que queda almacenada en la variable multi_pob:

h_y_m_comuna_corr_01$multi_pob <- h_y_m_comuna_corr_01$promedio_i * h_y_m_comuna_corr_01$personas * h_y_m_comuna_corr_01$p_poblacional
tablamadre <- head(h_y_m_comuna_corr_01,100)
kbl(tablamadre) %>%
  kable_styling(bootstrap_options = c("striped", "hover")) %>%
  kable_paper() %>%
  scroll_box(width = "100%", height = "300px")
zona código.x Freq.x anio comuna.x promedio_i año personas Ingresos_expandidos Freq.y p_poblacional código.y multi_pob
4101022001 04101 200 2017 La Serena 200287.4 2017 221054 44274327972 1157 0.0052340 04101 231732506.4
4101052007 04101 31 2017 La Serena 200287.4 2017 221054 44274327972 125 0.0005655 04101 25035923.3
4101062001 04101 97 2017 La Serena 200287.4 2017 221054 44274327972 345 0.0015607 04101 69099148.4
4101062004 04101 215 2017 La Serena 200287.4 2017 221054 44274327972 740 0.0033476 04101 148212666.1
4101062006 04101 54 2017 La Serena 200287.4 2017 221054 44274327972 224 0.0010133 04101 44864374.6
4101062024 04101 54 2017 La Serena 200287.4 2017 221054 44274327972 2392 0.0108209 04101 479087428.9
4101062030 04101 7 2017 La Serena 200287.4 2017 221054 44274327972 41 0.0001855 04101 8211782.9
4101062049 04101 37 2017 La Serena 200287.4 2017 221054 44274327972 115 0.0005202 04101 23033049.5
4101062901 04101 22 2017 La Serena 200287.4 2017 221054 44274327972 284 0.0012848 04101 56881617.8
4101072002 04101 106 2017 La Serena 200287.4 2017 221054 44274327972 394 0.0017824 04101 78913230.3
4101072027 04101 76 2017 La Serena 200287.4 2017 221054 44274327972 461 0.0020855 04101 92332485.3
4101072029 04101 1 2017 La Serena 200287.4 2017 221054 44274327972 119 0.0005383 04101 23834199.0
4101072051 04101 47 2017 La Serena 200287.4 2017 221054 44274327972 179 0.0008098 04101 35851442.2
4101072054 04101 6 2017 La Serena 200287.4 2017 221054 44274327972 114 0.0005157 04101 22832762.1
4101082011 04101 8 2017 La Serena 200287.4 2017 221054 44274327972 304 0.0013752 04101 60887365.5
4101082018 04101 46 2017 La Serena 200287.4 2017 221054 44274327972 348 0.0015743 04101 69700010.6
4101082021 04101 62 2017 La Serena 200287.4 2017 221054 44274327972 748 0.0033838 04101 149814965.2
4101082022 04101 1 2017 La Serena 200287.4 2017 221054 44274327972 13 0.0000588 04101 2603736.0
4101082023 04101 74 2017 La Serena 200287.4 2017 221054 44274327972 733 0.0033159 04101 146810654.4
4101082029 04101 10 2017 La Serena 200287.4 2017 221054 44274327972 140 0.0006333 04101 28040234.1
4101082043 04101 32 2017 La Serena 200287.4 2017 221054 44274327972 692 0.0031305 04101 138598871.6
4101082051 04101 8 2017 La Serena 200287.4 2017 221054 44274327972 36 0.0001629 04101 7210345.9
4101082052 04101 12 2017 La Serena 200287.4 2017 221054 44274327972 52 0.0002352 04101 10414944.1
4101082901 04101 6 2017 La Serena 200287.4 2017 221054 44274327972 37 0.0001674 04101 7410633.3
4101092003 04101 150 2017 La Serena 200287.4 2017 221054 44274327972 740 0.0033476 04101 148212666.1
4101092009 04101 2 2017 La Serena 200287.4 2017 221054 44274327972 144 0.0006514 04101 28841383.7
4101092034 04101 83 2017 La Serena 200287.4 2017 221054 44274327972 742 0.0033566 04101 148613240.9
4101092038 04101 4 2017 La Serena 200287.4 2017 221054 44274327972 329 0.0014883 04101 65894550.2
4101092039 04101 5 2017 La Serena 200287.4 2017 221054 44274327972 63 0.0002850 04101 12618105.4
4101102003 04101 17 2017 La Serena 200287.4 2017 221054 44274327972 70 0.0003167 04101 14020117.1
4101102013 04101 93 2017 La Serena 200287.4 2017 221054 44274327972 1201 0.0054331 04101 240545151.4
4101102015 04101 46 2017 La Serena 200287.4 2017 221054 44274327972 364 0.0016467 04101 72904608.7
4101102020 04101 276 2017 La Serena 200287.4 2017 221054 44274327972 2212 0.0100066 04101 443035699.3
4101102032 04101 1 2017 La Serena 200287.4 2017 221054 44274327972 48 0.0002171 04101 9613794.6
4101102035 04101 2 2017 La Serena 200287.4 2017 221054 44274327972 46 0.0002081 04101 9213219.8
4101112010 04101 1 2017 La Serena 200287.4 2017 221054 44274327972 66 0.0002986 04101 13218967.5
4101122010 04101 2 2017 La Serena 200287.4 2017 221054 44274327972 44 0.0001990 04101 8812645.0
4101122901 04101 1 2017 La Serena 200287.4 2017 221054 44274327972 63 0.0002850 04101 12618105.4
4101132025 04101 35 2017 La Serena 200287.4 2017 221054 44274327972 987 0.0044650 04101 197683650.6
4101132032 04101 17 2017 La Serena 200287.4 2017 221054 44274327972 824 0.0037276 04101 165036806.6
4101132046 04101 1 2017 La Serena 200287.4 2017 221054 44274327972 23 0.0001040 04101 4606609.9
4101132901 04101 4 2017 La Serena 200287.4 2017 221054 44274327972 36 0.0001629 04101 7210345.9
4101142012 04101 5 2017 La Serena 200287.4 2017 221054 44274327972 175 0.0007917 04101 35050292.7
4101142014 04101 62 2017 La Serena 200287.4 2017 221054 44274327972 519 0.0023478 04101 103949153.7
4101142019 04101 3 2017 La Serena 200287.4 2017 221054 44274327972 194 0.0008776 04101 38855753.0
4101142036 04101 16 2017 La Serena 200287.4 2017 221054 44274327972 225 0.0010179 04101 45064662.0
4101142040 04101 9 2017 La Serena 200287.4 2017 221054 44274327972 92 0.0004162 04101 18426439.6
4101142056 04101 140 2017 La Serena 200287.4 2017 221054 44274327972 383 0.0017326 04101 76710069.1
4101142057 04101 9 2017 La Serena 200287.4 2017 221054 44274327972 45 0.0002036 04101 9012932.4
4101142901 04101 69 2017 La Serena 200287.4 2017 221054 44274327972 324 0.0014657 04101 64893113.3
4101172030 04101 1 2017 La Serena 200287.4 2017 221054 44274327972 113 0.0005112 04101 22632474.7
4102062009 04102 28 2017 Coquimbo 206027.8 2017 227730 46918711304 395 0.0017345 04102 81380981.7
4102062014 04102 3 2017 Coquimbo 206027.8 2017 227730 46918711304 128 0.0005621 04102 26371558.6
4102062024 04102 343 2017 Coquimbo 206027.8 2017 227730 46918711304 4341 0.0190620 04102 894366687.6
4102062901 04102 29 2017 Coquimbo 206027.8 2017 227730 46918711304 111 0.0004874 04102 22869086.0
4102072002 04102 74 2017 Coquimbo 206027.8 2017 227730 46918711304 816 0.0035832 04102 168118686.3
4102072011 04102 29 2017 Coquimbo 206027.8 2017 227730 46918711304 156 0.0006850 04102 32140337.1
4102072021 04102 9 2017 Coquimbo 206027.8 2017 227730 46918711304 106 0.0004655 04102 21838947.0
4102072023 04102 14 2017 Coquimbo 206027.8 2017 227730 46918711304 565 0.0024810 04102 116405708.0
4102072024 04102 96 2017 Coquimbo 206027.8 2017 227730 46918711304 1893 0.0083125 04102 390010628.8
4102082004 04102 46 2017 Coquimbo 206027.8 2017 227730 46918711304 296 0.0012998 04102 60984229.3
4102082007 04102 6 2017 Coquimbo 206027.8 2017 227730 46918711304 52 0.0002283 04102 10713445.7
4102082016 04102 1 2017 Coquimbo 206027.8 2017 227730 46918711304 14 0.0000615 04102 2884389.2
4102082020 04102 4 2017 Coquimbo 206027.8 2017 227730 46918711304 8 0.0000351 04102 1648222.4
4102082032 04102 28 2017 Coquimbo 206027.8 2017 227730 46918711304 307 0.0013481 04102 63250535.2
4102082901 04102 11 2017 Coquimbo 206027.8 2017 227730 46918711304 77 0.0003381 04102 15864140.7
4102092026 04102 7 2017 Coquimbo 206027.8 2017 227730 46918711304 40 0.0001756 04102 8241112.1
4102112017 04102 52 2017 Coquimbo 206027.8 2017 227730 46918711304 760 0.0033373 04102 156581129.4
4102112025 04102 20 2017 Coquimbo 206027.8 2017 227730 46918711304 233 0.0010231 04102 48004477.8
4102112029 04102 69 2017 Coquimbo 206027.8 2017 227730 46918711304 1312 0.0057612 04102 270308476.0
4102112901 04102 3 2017 Coquimbo 206027.8 2017 227730 46918711304 45 0.0001976 04102 9271251.1
4102122018 04102 5 2017 Coquimbo 206027.8 2017 227730 46918711304 460 0.0020199 04102 94772788.8
4102132001 04102 1 2017 Coquimbo 206027.8 2017 227730 46918711304 61 0.0002679 04102 12567695.9
4102142012 04102 6 2017 Coquimbo 206027.8 2017 227730 46918711304 288 0.0012647 04102 59336006.9
4102152012 04102 3 2017 Coquimbo 206027.8 2017 227730 46918711304 50 0.0002196 04102 10301390.1
4102152030 04102 11 2017 Coquimbo 206027.8 2017 227730 46918711304 122 0.0005357 04102 25135391.8
4102162013 04102 32 2017 Coquimbo 206027.8 2017 227730 46918711304 252 0.0011066 04102 51919006.1
4102162901 04102 2 2017 Coquimbo 206027.8 2017 227730 46918711304 19 0.0000834 04102 3914528.2
4102182004 04102 1 2017 Coquimbo 206027.8 2017 227730 46918711304 19 0.0000834 04102 3914528.2
4103012011 04103 1 2017 Andacollo 217096.4 2017 11044 2397612293 14 0.0012677 04103 3039349.2
4103012014 04103 5 2017 Andacollo 217096.4 2017 11044 2397612293 55 0.0049801 04103 11940300.3
4103012901 04103 5 2017 Andacollo 217096.4 2017 11044 2397612293 83 0.0075154 04103 18018998.6
4103032005 04103 26 2017 Andacollo 217096.4 2017 11044 2397612293 537 0.0486237 04103 116580749.8
4103032013 04103 3 2017 Andacollo 217096.4 2017 11044 2397612293 72 0.0065194 04103 15630938.5
4103032901 04103 1 2017 Andacollo 217096.4 2017 11044 2397612293 31 0.0028070 04103 6729987.4
4104012013 04104 2 2017 La Higuera 231674.2 2017 4241 982530309 53 0.0124971 04104 12278732.9
4104022002 04104 22 2017 La Higuera 231674.2 2017 4241 982530309 839 0.1978307 04104 194374659.1
4104022006 04104 2 2017 La Higuera 231674.2 2017 4241 982530309 43 0.0101391 04104 9961990.9
4104022901 04104 1 2017 La Higuera 231674.2 2017 4241 982530309 19 0.0044801 04104 4401809.9
4104032014 04104 1 2017 La Higuera 231674.2 2017 4241 982530309 66 0.0155624 04104 15290497.6
4104042003 04104 6 2017 La Higuera 231674.2 2017 4241 982530309 267 0.0629568 04104 61857013.1
4104042028 04104 1 2017 La Higuera 231674.2 2017 4241 982530309 52 0.0122613 04104 12047058.7
4104042901 04104 2 2017 La Higuera 231674.2 2017 4241 982530309 18 0.0042443 04104 4170135.7
4104052004 04104 28 2017 La Higuera 231674.2 2017 4241 982530309 144 0.0339543 04104 33361085.7
4104052017 04104 13 2017 La Higuera 231674.2 2017 4241 982530309 231 0.0544683 04104 53516741.7
4104052023 04104 10 2017 La Higuera 231674.2 2017 4241 982530309 311 0.0733318 04104 72050678.2
4104062004 04104 1 2017 La Higuera 231674.2 2017 4241 982530309 3 0.0007074 04104 695022.6
4104062901 04104 2 2017 La Higuera 231674.2 2017 4241 982530309 52 0.0122613 04104 12047058.7
4104072015 04104 7 2017 La Higuera 231674.2 2017 4241 982530309 21 0.0049517 04104 4865158.3
4104072018 04104 2 2017 La Higuera 231674.2 2017 4241 982530309 72 0.0169771 04104 16680542.9

7 Análisis de regresión

Aplicaremos un análisis de regresión donde:

\[ Y(dependiente) = ingreso \ expandido \ por \ zona \ (multi\_pob)\]

\[ X(independiente) = frecuencia \ de \ población \ que \ posee \ la \ variable \ Censal \ respecto \ a \ la \ zona \ (Freq.x) \]

7.1 Diagrama de dispersión loess

scatter.smooth(x=h_y_m_comuna_corr_01$Freq.x, y=h_y_m_comuna_corr_01$multi_pob, main="multi_pob ~ Freq.x",
     xlab = "Freq.x",
     ylab = "multi_pob",
           col = 2) 

7.2 Outliers

Hemos demostrado en el punto 5.7.2 de aquí que la exclusión de ouliers no genera ninguna mejora en el modelo de regresión.

7.3 Modelo lineal

Aplicaremos un análisis de regresión lineal del ingreso expandido por zona sobre las frecuencias de respuestas zonales.

linearMod <- lm( multi_pob~(Freq.x) , data=h_y_m_comuna_corr_01)
summary(linearMod) 
## 
## Call:
## lm(formula = multi_pob ~ (Freq.x), data = h_y_m_comuna_corr_01)
## 
## Residuals:
##        Min         1Q     Median         3Q        Max 
## -278221496  -23193237  -13816238   12214913  365245216 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) 26124236    2570012   10.16   <2e-16 ***
## Freq.x       1624407      68025   23.88   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 52130000 on 501 degrees of freedom
## Multiple R-squared:  0.5323, Adjusted R-squared:  0.5314 
## F-statistic: 570.2 on 1 and 501 DF,  p-value: < 2.2e-16

7.4 Gráfica de la recta de regresión lineal

ggplot(h_y_m_comuna_corr_01, aes(x = Freq.x , y = multi_pob)) + 
  geom_point() +
  stat_smooth(method = "lm", col = "red")

Si bien obtenemos nuestro modelo lineal da cuenta del 0.8214 de la variabilidad de los datos de respuesta en torno a su media, modelos alternativos pueden ofrecernos una explicación de la variable dependiente aún mayor.

8 Modelos alternativos

8.1 Modelo cuadrático

\[ \hat Y = \beta_0 + \beta_1 X^2 \]

linearMod <- lm( multi_pob~(Freq.x^2) , data=h_y_m_comuna_corr_01)
summary(linearMod) 
## 
## Call:
## lm(formula = multi_pob ~ (Freq.x^2), data = h_y_m_comuna_corr_01)
## 
## Residuals:
##        Min         1Q     Median         3Q        Max 
## -278221496  -23193237  -13816238   12214913  365245216 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) 26124236    2570012   10.16   <2e-16 ***
## Freq.x       1624407      68025   23.88   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 52130000 on 501 degrees of freedom
## Multiple R-squared:  0.5323, Adjusted R-squared:  0.5314 
## F-statistic: 570.2 on 1 and 501 DF,  p-value: < 2.2e-16

8.2 Modelo cúbico

\[ \hat Y = \beta_0 + \beta_1 X^3 \]

linearMod <- lm( multi_pob~(Freq.x^3) , data=h_y_m_comuna_corr_01)
summary(linearMod) 
## 
## Call:
## lm(formula = multi_pob ~ (Freq.x^3), data = h_y_m_comuna_corr_01)
## 
## Residuals:
##        Min         1Q     Median         3Q        Max 
## -278221496  -23193237  -13816238   12214913  365245216 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) 26124236    2570012   10.16   <2e-16 ***
## Freq.x       1624407      68025   23.88   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 52130000 on 501 degrees of freedom
## Multiple R-squared:  0.5323, Adjusted R-squared:  0.5314 
## F-statistic: 570.2 on 1 and 501 DF,  p-value: < 2.2e-16

8.3 Modelo logarítmico

\[ \hat Y = \beta_0 + \beta_1 ln X \]

linearMod <- lm( multi_pob~log(Freq.x) , data=h_y_m_comuna_corr_01)
summary(linearMod) 
## 
## Call:
## lm(formula = multi_pob ~ log(Freq.x), data = h_y_m_comuna_corr_01)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -99736405 -25667017  -3975274  20226060 690916003 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept) -12318916    4108910  -2.998  0.00285 ** 
## log(Freq.x)  36961213    1849360  19.986  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 56860000 on 501 degrees of freedom
## Multiple R-squared:  0.4436, Adjusted R-squared:  0.4425 
## F-statistic: 399.4 on 1 and 501 DF,  p-value: < 2.2e-16

8.4 Modelo exponencial

\[ \hat Y = \beta_0 + \beta_1 e^X \]

No es aplicable sin una transformación pues los valores elevados a \(e\) de Freq.x tienden a infinito.

8.5 Modelo con raíz cuadrada

\[ \hat Y = \beta_0 + \beta_1 \sqrt {X} \]

linearMod <- lm( multi_pob~sqrt(Freq.x) , data=h_y_m_comuna_corr_01)
summary(linearMod) 
## 
## Call:
## lm(formula = multi_pob ~ sqrt(Freq.x), data = h_y_m_comuna_corr_01)
## 
## Residuals:
##        Min         1Q     Median         3Q        Max 
## -170843488  -15896802   -1304602   11173235  497424443 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  -16735388    3509727  -4.768 2.44e-06 ***
## sqrt(Freq.x)  22336493     874233  25.550  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 50230000 on 501 degrees of freedom
## Multiple R-squared:  0.5658, Adjusted R-squared:  0.5649 
## F-statistic: 652.8 on 1 and 501 DF,  p-value: < 2.2e-16

8.6 Modelo raíz-raíz

\[ \hat Y = {\beta_0}^2 + 2 \beta_0 \beta_1 \sqrt{X}+ \beta_1^2 X \]

linearMod <- lm( sqrt(multi_pob)~sqrt(Freq.x) , data=h_y_m_comuna_corr_01)
summary(linearMod) 
## 
## Call:
## lm(formula = sqrt(multi_pob) ~ sqrt(Freq.x), data = h_y_m_comuna_corr_01)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -7673.7 -1572.5  -334.8  1503.5 10761.9 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept)    2430.2      172.2   14.11   <2e-16 ***
## sqrt(Freq.x)   1183.4       42.9   27.59   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2465 on 501 degrees of freedom
## Multiple R-squared:  0.603,  Adjusted R-squared:  0.6022 
## F-statistic:   761 on 1 and 501 DF,  p-value: < 2.2e-16

8.7 Modelo log-raíz

\[ \hat Y = e^{\beta_0 + \beta_1 \sqrt{X}} \]

linearMod <- lm( log(multi_pob)~sqrt(Freq.x) , data=h_y_m_comuna_corr_01)
summary(linearMod) 
## 
## Call:
## lm(formula = log(multi_pob) ~ sqrt(Freq.x), data = h_y_m_comuna_corr_01)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -4.2270 -0.5840  0.0542  0.6973  1.6676 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  16.00095    0.06390  250.42   <2e-16 ***
## sqrt(Freq.x)  0.33792    0.01592   21.23   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9145 on 501 degrees of freedom
## Multiple R-squared:  0.4736, Adjusted R-squared:  0.4726 
## F-statistic: 450.8 on 1 and 501 DF,  p-value: < 2.2e-16

8.8 Modelo raíz-log

\[ \hat Y = {\beta_0}^2 + 2 \beta_0 \beta_1 \ln{X}+ \beta_1^2 ln^2X \]

linearMod <- lm( sqrt(multi_pob)~log(Freq.x) , data=h_y_m_comuna_corr_01)
summary(linearMod) 
## 
## Call:
## lm(formula = sqrt(multi_pob) ~ log(Freq.x), data = h_y_m_comuna_corr_01)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -5613.3 -1587.2   -25.1  1324.4 14781.3 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  2224.20     178.30   12.47   <2e-16 ***
## log(Freq.x)  2209.85      80.25   27.54   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2467 on 501 degrees of freedom
## Multiple R-squared:  0.6021, Adjusted R-squared:  0.6014 
## F-statistic: 758.3 on 1 and 501 DF,  p-value: < 2.2e-16

8.9 Modelo log-log

\[ \hat Y = e^{\beta_0+\beta_1 ln{X}} \]

linearMod <- lm( log(multi_pob)~log(Freq.x) , data=h_y_m_comuna_corr_01)
summary(linearMod) 
## 
## Call:
## lm(formula = log(multi_pob) ~ log(Freq.x), data = h_y_m_comuna_corr_01)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -3.7092 -0.5068  0.0602  0.5777  2.0457 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) 15.82112    0.05886  268.77   <2e-16 ***
## log(Freq.x)  0.70024    0.02649   26.43   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.8146 on 501 degrees of freedom
## Multiple R-squared:  0.5823, Adjusted R-squared:  0.5815 
## F-statistic: 698.6 on 1 and 501 DF,  p-value: < 2.2e-16

9 Modelo raíz-raíz (raíz-raíz)

Es éste el modelo que nos entrega el mayor coeficiente de determinación de todos (0.6022).

9.1 Diagrama de dispersión sobre raíz-raíz

Desplegamos una curva suavizada por loess en el diagrama de dispersión.

scatter.smooth(x=sqrt(h_y_m_comuna_corr_01$Freq.x), y=sqrt(h_y_m_comuna_corr_01$multi_pob), lpars = list(col = "red", lwd = 2, lty = 1), main="multi_pob ~ Freq.x")

9.2 Modelo raíz-raíz

Observemos nuevamente el resultado sobre raíz-raíz.

linearMod <- lm(sqrt( multi_pob)~sqrt(Freq.x) , data=h_y_m_comuna_corr_01)
summary(linearMod) 
## 
## Call:
## lm(formula = sqrt(multi_pob) ~ sqrt(Freq.x), data = h_y_m_comuna_corr_01)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -7673.7 -1572.5  -334.8  1503.5 10761.9 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept)    2430.2      172.2   14.11   <2e-16 ***
## sqrt(Freq.x)   1183.4       42.9   27.59   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2465 on 501 degrees of freedom
## Multiple R-squared:  0.603,  Adjusted R-squared:  0.6022 
## F-statistic:   761 on 1 and 501 DF,  p-value: < 2.2e-16
ggplot(h_y_m_comuna_corr_01, aes(x = sqrt(Freq.x) , y = sqrt(multi_pob))) + 
  geom_point() +
  stat_smooth(method = "lm", col = "red")

9.3 Análisis de residuos

par(mfrow = c (2,2))
plot(linearMod)

9.4 Ecuación del modelo


\[ \hat Y = { 2430.2}^2 + 2 \cdot 2430.2 \cdot 1183.4 \sqrt{X}+ 1183.4^2 \cdot X \]


10 Aplicación la regresión a los valores de la variable a nivel de zona

Esta nueva variable se llamará: est_ing

h_y_m_comuna_corr_01$est_ing <- 2430.2^2 + 2 *  2430.2 * 1183.4 *sqrt(h_y_m_comuna_corr_01$Freq.x)+  1183.4^2* (h_y_m_comuna_corr_01$Freq.x) 

r3_100 <- h_y_m_comuna_corr_01[c(1:100),]
kbl(r3_100) %>%
  kable_styling(bootstrap_options = c("striped", "hover")) %>%
  kable_paper() %>%
  scroll_box(width = "100%", height = "300px")
zona código.x Freq.x anio comuna.x promedio_i año personas Ingresos_expandidos Freq.y p_poblacional código.y multi_pob est_ing
4101022001 04101 200 2017 La Serena 200287.4 2017 221054 44274327972 1157 0.0052340 04101 231732506.4 367335682
4101052007 04101 31 2017 La Serena 200287.4 2017 221054 44274327972 125 0.0005655 04101 25035923.3 81344027
4101062001 04101 97 2017 La Serena 200287.4 2017 221054 44274327972 345 0.0015607 04101 69099148.4 198396756
4101062004 04101 215 2017 La Serena 200287.4 2017 221054 44274327972 740 0.0033476 04101 148212666.1 391337422
4101062006 04101 54 2017 La Serena 200287.4 2017 221054 44274327972 224 0.0010133 04101 44864374.6 123796298
4101062024 04101 54 2017 La Serena 200287.4 2017 221054 44274327972 2392 0.0108209 04101 479087428.9 123796298
4101062030 04101 7 2017 La Serena 200287.4 2017 221054 44274327972 41 0.0001855 04101 8211782.9 30926746
4101062049 04101 37 2017 La Serena 200287.4 2017 221054 44274327972 115 0.0005202 04101 23033049.5 92708805
4101062901 04101 22 2017 La Serena 200287.4 2017 221054 44274327972 284 0.0012848 04101 56881617.8 63693775
4101072002 04101 106 2017 La Serena 200287.4 2017 221054 44274327972 394 0.0017824 04101 78913230.3 213570420
4101072027 04101 76 2017 La Serena 200287.4 2017 221054 44274327972 461 0.0020855 04101 92332485.3 162481981
4101072029 04101 1 2017 La Serena 200287.4 2017 221054 44274327972 119 0.0005383 04101 23834199.0 13058105
4101072051 04101 47 2017 La Serena 200287.4 2017 221054 44274327972 179 0.0008098 04101 35851442.2 111158679
4101072054 04101 6 2017 La Serena 200287.4 2017 221054 44274327972 114 0.0005157 04101 22832762.1 28397454
4101082011 04101 8 2017 La Serena 200287.4 2017 221054 44274327972 304 0.0013752 04101 60887365.5 33377896
4101082018 04101 46 2017 La Serena 200287.4 2017 221054 44274327972 348 0.0015743 04101 69700010.6 109336495
4101082021 04101 62 2017 La Serena 200287.4 2017 221054 44274327972 748 0.0033838 04101 149814965.2 138022574
4101082022 04101 1 2017 La Serena 200287.4 2017 221054 44274327972 13 0.0000588 04101 2603736.0 13058105
4101082023 04101 74 2017 La Serena 200287.4 2017 221054 44274327972 733 0.0033159 04101 146810654.4 159016935
4101082029 04101 10 2017 La Serena 200287.4 2017 221054 44274327972 140 0.0006333 04101 28040234.1 38099008
4101082043 04101 32 2017 La Serena 200287.4 2017 221054 44274327972 692 0.0031305 04101 138598871.6 83256889
4101082051 04101 8 2017 La Serena 200287.4 2017 221054 44274327972 36 0.0001629 04101 7210345.9 33377896
4101082052 04101 12 2017 La Serena 200287.4 2017 221054 44274327972 52 0.0002352 04101 10414944.1 42635909
4101082901 04101 6 2017 La Serena 200287.4 2017 221054 44274327972 37 0.0001674 04101 7410633.3 28397454
4101092003 04101 150 2017 La Serena 200287.4 2017 221054 44274327972 740 0.0033476 04101 148212666.1 286416049
4101092009 04101 2 2017 La Serena 200287.4 2017 221054 44274327972 144 0.0006514 04101 28841383.7 16841013
4101092034 04101 83 2017 La Serena 200287.4 2017 221054 44274327972 742 0.0033566 04101 148613240.9 174543391
4101092038 04101 4 2017 La Serena 200287.4 2017 221054 44274327972 329 0.0014883 04101 65894550.2 23011209
4101092039 04101 5 2017 La Serena 200287.4 2017 221054 44274327972 63 0.0002850 04101 12618105.4 25769460
4101102003 04101 17 2017 La Serena 200287.4 2017 221054 44274327972 70 0.0003167 04101 14020117.1 53428545
4101102013 04101 93 2017 La Serena 200287.4 2017 221054 44274327972 1201 0.0054331 04101 240545151.4 191614704
4101102015 04101 46 2017 La Serena 200287.4 2017 221054 44274327972 364 0.0016467 04101 72904608.7 109336495
4101102020 04101 276 2017 La Serena 200287.4 2017 221054 44274327972 2212 0.0100066 04101 443035699.3 487982121
4101102032 04101 1 2017 La Serena 200287.4 2017 221054 44274327972 48 0.0002171 04101 9613794.6 13058105
4101102035 04101 2 2017 La Serena 200287.4 2017 221054 44274327972 46 0.0002081 04101 9213219.8 16841013
4101112010 04101 1 2017 La Serena 200287.4 2017 221054 44274327972 66 0.0002986 04101 13218967.5 13058105
4101122010 04101 2 2017 La Serena 200287.4 2017 221054 44274327972 44 0.0001990 04101 8812645.0 16841013
4101122901 04101 1 2017 La Serena 200287.4 2017 221054 44274327972 63 0.0002850 04101 12618105.4 13058105
4101132025 04101 35 2017 La Serena 200287.4 2017 221054 44274327972 987 0.0044650 04101 197683650.6 88949209
4101132032 04101 17 2017 La Serena 200287.4 2017 221054 44274327972 824 0.0037276 04101 165036806.6 53428545
4101132046 04101 1 2017 La Serena 200287.4 2017 221054 44274327972 23 0.0001040 04101 4606609.9 13058105
4101132901 04101 4 2017 La Serena 200287.4 2017 221054 44274327972 36 0.0001629 04101 7210345.9 23011209
4101142012 04101 5 2017 La Serena 200287.4 2017 221054 44274327972 175 0.0007917 04101 35050292.7 25769460
4101142014 04101 62 2017 La Serena 200287.4 2017 221054 44274327972 519 0.0023478 04101 103949153.7 138022574
4101142019 04101 3 2017 La Serena 200287.4 2017 221054 44274327972 194 0.0008776 04101 38855753.0 20069584
4101142036 04101 16 2017 La Serena 200287.4 2017 221054 44274327972 225 0.0010179 04101 45064662.0 51320030
4101142040 04101 9 2017 La Serena 200287.4 2017 221054 44274327972 92 0.0004162 04101 18426439.6 35765184
4101142056 04101 140 2017 La Serena 200287.4 2017 221054 44274327972 383 0.0017326 04101 76710069.1 270023035
4101142057 04101 9 2017 La Serena 200287.4 2017 221054 44274327972 45 0.0002036 04101 9012932.4 35765184
4101142901 04101 69 2017 La Serena 200287.4 2017 221054 44274327972 324 0.0014657 04101 64893113.3 150313943
4101172030 04101 1 2017 La Serena 200287.4 2017 221054 44274327972 113 0.0005112 04101 22632474.7 13058105
4102062009 04102 28 2017 Coquimbo 206027.8 2017 227730 46918711304 395 0.0017345 04102 81380981.7 75553719
4102062014 04102 3 2017 Coquimbo 206027.8 2017 227730 46918711304 128 0.0005621 04102 26371558.6 20069584
4102062024 04102 343 2017 Coquimbo 206027.8 2017 227730 46918711304 4341 0.0190620 04102 894366687.6 592780047
4102062901 04102 29 2017 Coquimbo 206027.8 2017 227730 46918711304 111 0.0004874 04102 22869086.0 77492880
4102072002 04102 74 2017 Coquimbo 206027.8 2017 227730 46918711304 816 0.0035832 04102 168118686.3 159016935
4102072011 04102 29 2017 Coquimbo 206027.8 2017 227730 46918711304 156 0.0006850 04102 32140337.1 77492880
4102072021 04102 9 2017 Coquimbo 206027.8 2017 227730 46918711304 106 0.0004655 04102 21838947.0 35765184
4102072023 04102 14 2017 Coquimbo 206027.8 2017 227730 46918711304 565 0.0024810 04102 116405708.0 47033225
4102072024 04102 96 2017 Coquimbo 206027.8 2017 227730 46918711304 1893 0.0083125 04102 390010628.8 196703560
4102082004 04102 46 2017 Coquimbo 206027.8 2017 227730 46918711304 296 0.0012998 04102 60984229.3 109336495
4102082007 04102 6 2017 Coquimbo 206027.8 2017 227730 46918711304 52 0.0002283 04102 10713445.7 28397454
4102082016 04102 1 2017 Coquimbo 206027.8 2017 227730 46918711304 14 0.0000615 04102 2884389.2 13058105
4102082020 04102 4 2017 Coquimbo 206027.8 2017 227730 46918711304 8 0.0000351 04102 1648222.4 23011209
4102082032 04102 28 2017 Coquimbo 206027.8 2017 227730 46918711304 307 0.0013481 04102 63250535.2 75553719
4102082901 04102 11 2017 Coquimbo 206027.8 2017 227730 46918711304 77 0.0003381 04102 15864140.7 40387217
4102092026 04102 7 2017 Coquimbo 206027.8 2017 227730 46918711304 40 0.0001756 04102 8241112.1 30926746
4102112017 04102 52 2017 Coquimbo 206027.8 2017 227730 46918711304 760 0.0033373 04102 156581129.4 120205322
4102112025 04102 20 2017 Coquimbo 206027.8 2017 227730 46918711304 233 0.0010231 04102 48004477.8 59637403
4102112029 04102 69 2017 Coquimbo 206027.8 2017 227730 46918711304 1312 0.0057612 04102 270308476.0 150313943
4102112901 04102 3 2017 Coquimbo 206027.8 2017 227730 46918711304 45 0.0001976 04102 9271251.1 20069584
4102122018 04102 5 2017 Coquimbo 206027.8 2017 227730 46918711304 460 0.0020199 04102 94772788.8 25769460
4102132001 04102 1 2017 Coquimbo 206027.8 2017 227730 46918711304 61 0.0002679 04102 12567695.9 13058105
4102142012 04102 6 2017 Coquimbo 206027.8 2017 227730 46918711304 288 0.0012647 04102 59336006.9 28397454
4102152012 04102 3 2017 Coquimbo 206027.8 2017 227730 46918711304 50 0.0002196 04102 10301390.1 20069584
4102152030 04102 11 2017 Coquimbo 206027.8 2017 227730 46918711304 122 0.0005357 04102 25135391.8 40387217
4102162013 04102 32 2017 Coquimbo 206027.8 2017 227730 46918711304 252 0.0011066 04102 51919006.1 83256889
4102162901 04102 2 2017 Coquimbo 206027.8 2017 227730 46918711304 19 0.0000834 04102 3914528.2 16841013
4102182004 04102 1 2017 Coquimbo 206027.8 2017 227730 46918711304 19 0.0000834 04102 3914528.2 13058105
4103012011 04103 1 2017 Andacollo 217096.4 2017 11044 2397612293 14 0.0012677 04103 3039349.2 13058105
4103012014 04103 5 2017 Andacollo 217096.4 2017 11044 2397612293 55 0.0049801 04103 11940300.3 25769460
4103012901 04103 5 2017 Andacollo 217096.4 2017 11044 2397612293 83 0.0075154 04103 18018998.6 25769460
4103032005 04103 26 2017 Andacollo 217096.4 2017 11044 2397612293 537 0.0486237 04103 116580749.8 71645724
4103032013 04103 3 2017 Andacollo 217096.4 2017 11044 2397612293 72 0.0065194 04103 15630938.5 20069584
4103032901 04103 1 2017 Andacollo 217096.4 2017 11044 2397612293 31 0.0028070 04103 6729987.4 13058105
4104012013 04104 2 2017 La Higuera 231674.2 2017 4241 982530309 53 0.0124971 04104 12278732.9 16841013
4104022002 04104 22 2017 La Higuera 231674.2 2017 4241 982530309 839 0.1978307 04104 194374659.1 63693775
4104022006 04104 2 2017 La Higuera 231674.2 2017 4241 982530309 43 0.0101391 04104 9961990.9 16841013
4104022901 04104 1 2017 La Higuera 231674.2 2017 4241 982530309 19 0.0044801 04104 4401809.9 13058105
4104032014 04104 1 2017 La Higuera 231674.2 2017 4241 982530309 66 0.0155624 04104 15290497.6 13058105
4104042003 04104 6 2017 La Higuera 231674.2 2017 4241 982530309 267 0.0629568 04104 61857013.1 28397454
4104042028 04104 1 2017 La Higuera 231674.2 2017 4241 982530309 52 0.0122613 04104 12047058.7 13058105
4104042901 04104 2 2017 La Higuera 231674.2 2017 4241 982530309 18 0.0042443 04104 4170135.7 16841013
4104052004 04104 28 2017 La Higuera 231674.2 2017 4241 982530309 144 0.0339543 04104 33361085.7 75553719
4104052017 04104 13 2017 La Higuera 231674.2 2017 4241 982530309 231 0.0544683 04104 53516741.7 44849935
4104052023 04104 10 2017 La Higuera 231674.2 2017 4241 982530309 311 0.0733318 04104 72050678.2 38099008
4104062004 04104 1 2017 La Higuera 231674.2 2017 4241 982530309 3 0.0007074 04104 695022.6 13058105
4104062901 04104 2 2017 La Higuera 231674.2 2017 4241 982530309 52 0.0122613 04104 12047058.7 16841013
4104072015 04104 7 2017 La Higuera 231674.2 2017 4241 982530309 21 0.0049517 04104 4865158.3 30926746
4104072018 04104 2 2017 La Higuera 231674.2 2017 4241 982530309 72 0.0169771 04104 16680542.9 16841013


11 División del valor estimado entre la población total de la zona para obtener el ingreso medio por zona


\[ Ingreso \_ Medio\_zona = est\_ing / (personas * p\_poblacional) \]


h_y_m_comuna_corr_01$ing_medio_zona <- h_y_m_comuna_corr_01$est_ing  /( h_y_m_comuna_corr_01$personas  * h_y_m_comuna_corr_01$p_poblacional)

r3_100 <- h_y_m_comuna_corr_01[c(1:100),]
kbl(r3_100) %>%
  kable_styling(bootstrap_options = c("striped", "hover")) %>%
  kable_paper() %>%
  scroll_box(width = "100%", height = "300px")
zona código.x Freq.x anio comuna.x promedio_i año personas Ingresos_expandidos Freq.y p_poblacional código.y multi_pob est_ing ing_medio_zona
4101022001 04101 200 2017 La Serena 200287.4 2017 221054 44274327972 1157 0.0052340 04101 231732506.4 367335682 317489.79
4101052007 04101 31 2017 La Serena 200287.4 2017 221054 44274327972 125 0.0005655 04101 25035923.3 81344027 650752.21
4101062001 04101 97 2017 La Serena 200287.4 2017 221054 44274327972 345 0.0015607 04101 69099148.4 198396756 575063.06
4101062004 04101 215 2017 La Serena 200287.4 2017 221054 44274327972 740 0.0033476 04101 148212666.1 391337422 528834.35
4101062006 04101 54 2017 La Serena 200287.4 2017 221054 44274327972 224 0.0010133 04101 44864374.6 123796298 552662.05
4101062024 04101 54 2017 La Serena 200287.4 2017 221054 44274327972 2392 0.0108209 04101 479087428.9 123796298 51754.31
4101062030 04101 7 2017 La Serena 200287.4 2017 221054 44274327972 41 0.0001855 04101 8211782.9 30926746 754310.89
4101062049 04101 37 2017 La Serena 200287.4 2017 221054 44274327972 115 0.0005202 04101 23033049.5 92708805 806163.52
4101062901 04101 22 2017 La Serena 200287.4 2017 221054 44274327972 284 0.0012848 04101 56881617.8 63693775 224273.86
4101072002 04101 106 2017 La Serena 200287.4 2017 221054 44274327972 394 0.0017824 04101 78913230.3 213570420 542056.90
4101072027 04101 76 2017 La Serena 200287.4 2017 221054 44274327972 461 0.0020855 04101 92332485.3 162481981 352455.49
4101072029 04101 1 2017 La Serena 200287.4 2017 221054 44274327972 119 0.0005383 04101 23834199.0 13058105 109731.97
4101072051 04101 47 2017 La Serena 200287.4 2017 221054 44274327972 179 0.0008098 04101 35851442.2 111158679 620998.21
4101072054 04101 6 2017 La Serena 200287.4 2017 221054 44274327972 114 0.0005157 04101 22832762.1 28397454 249100.47
4101082011 04101 8 2017 La Serena 200287.4 2017 221054 44274327972 304 0.0013752 04101 60887365.5 33377896 109795.71
4101082018 04101 46 2017 La Serena 200287.4 2017 221054 44274327972 348 0.0015743 04101 69700010.6 109336495 314185.33
4101082021 04101 62 2017 La Serena 200287.4 2017 221054 44274327972 748 0.0033838 04101 149814965.2 138022574 184522.16
4101082022 04101 1 2017 La Serena 200287.4 2017 221054 44274327972 13 0.0000588 04101 2603736.0 13058105 1004469.61
4101082023 04101 74 2017 La Serena 200287.4 2017 221054 44274327972 733 0.0033159 04101 146810654.4 159016935 216939.88
4101082029 04101 10 2017 La Serena 200287.4 2017 221054 44274327972 140 0.0006333 04101 28040234.1 38099008 272135.77
4101082043 04101 32 2017 La Serena 200287.4 2017 221054 44274327972 692 0.0031305 04101 138598871.6 83256889 120313.42
4101082051 04101 8 2017 La Serena 200287.4 2017 221054 44274327972 36 0.0001629 04101 7210345.9 33377896 927163.78
4101082052 04101 12 2017 La Serena 200287.4 2017 221054 44274327972 52 0.0002352 04101 10414944.1 42635909 819921.33
4101082901 04101 6 2017 La Serena 200287.4 2017 221054 44274327972 37 0.0001674 04101 7410633.3 28397454 767498.76
4101092003 04101 150 2017 La Serena 200287.4 2017 221054 44274327972 740 0.0033476 04101 148212666.1 286416049 387048.72
4101092009 04101 2 2017 La Serena 200287.4 2017 221054 44274327972 144 0.0006514 04101 28841383.7 16841013 116951.48
4101092034 04101 83 2017 La Serena 200287.4 2017 221054 44274327972 742 0.0033566 04101 148613240.9 174543391 235233.68
4101092038 04101 4 2017 La Serena 200287.4 2017 221054 44274327972 329 0.0014883 04101 65894550.2 23011209 69942.88
4101092039 04101 5 2017 La Serena 200287.4 2017 221054 44274327972 63 0.0002850 04101 12618105.4 25769460 409039.04
4101102003 04101 17 2017 La Serena 200287.4 2017 221054 44274327972 70 0.0003167 04101 14020117.1 53428545 763264.92
4101102013 04101 93 2017 La Serena 200287.4 2017 221054 44274327972 1201 0.0054331 04101 240545151.4 191614704 159545.97
4101102015 04101 46 2017 La Serena 200287.4 2017 221054 44274327972 364 0.0016467 04101 72904608.7 109336495 300374.99
4101102020 04101 276 2017 La Serena 200287.4 2017 221054 44274327972 2212 0.0100066 04101 443035699.3 487982121 220606.75
4101102032 04101 1 2017 La Serena 200287.4 2017 221054 44274327972 48 0.0002171 04101 9613794.6 13058105 272043.85
4101102035 04101 2 2017 La Serena 200287.4 2017 221054 44274327972 46 0.0002081 04101 9213219.8 16841013 366108.98
4101112010 04101 1 2017 La Serena 200287.4 2017 221054 44274327972 66 0.0002986 04101 13218967.5 13058105 197850.08
4101122010 04101 2 2017 La Serena 200287.4 2017 221054 44274327972 44 0.0001990 04101 8812645.0 16841013 382750.30
4101122901 04101 1 2017 La Serena 200287.4 2017 221054 44274327972 63 0.0002850 04101 12618105.4 13058105 207271.51
4101132025 04101 35 2017 La Serena 200287.4 2017 221054 44274327972 987 0.0044650 04101 197683650.6 88949209 90120.78
4101132032 04101 17 2017 La Serena 200287.4 2017 221054 44274327972 824 0.0037276 04101 165036806.6 53428545 64840.47
4101132046 04101 1 2017 La Serena 200287.4 2017 221054 44274327972 23 0.0001040 04101 4606609.9 13058105 567743.69
4101132901 04101 4 2017 La Serena 200287.4 2017 221054 44274327972 36 0.0001629 04101 7210345.9 23011209 639200.25
4101142012 04101 5 2017 La Serena 200287.4 2017 221054 44274327972 175 0.0007917 04101 35050292.7 25769460 147254.06
4101142014 04101 62 2017 La Serena 200287.4 2017 221054 44274327972 519 0.0023478 04101 103949153.7 138022574 265939.45
4101142019 04101 3 2017 La Serena 200287.4 2017 221054 44274327972 194 0.0008776 04101 38855753.0 20069584 103451.46
4101142036 04101 16 2017 La Serena 200287.4 2017 221054 44274327972 225 0.0010179 04101 45064662.0 51320030 228089.02
4101142040 04101 9 2017 La Serena 200287.4 2017 221054 44274327972 92 0.0004162 04101 18426439.6 35765184 388752.00
4101142056 04101 140 2017 La Serena 200287.4 2017 221054 44274327972 383 0.0017326 04101 76710069.1 270023035 705020.98
4101142057 04101 9 2017 La Serena 200287.4 2017 221054 44274327972 45 0.0002036 04101 9012932.4 35765184 794781.87
4101142901 04101 69 2017 La Serena 200287.4 2017 221054 44274327972 324 0.0014657 04101 64893113.3 150313943 463931.92
4101172030 04101 1 2017 La Serena 200287.4 2017 221054 44274327972 113 0.0005112 04101 22632474.7 13058105 115558.45
4102062009 04102 28 2017 Coquimbo 206027.8 2017 227730 46918711304 395 0.0017345 04102 81380981.7 75553719 191275.24
4102062014 04102 3 2017 Coquimbo 206027.8 2017 227730 46918711304 128 0.0005621 04102 26371558.6 20069584 156793.62
4102062024 04102 343 2017 Coquimbo 206027.8 2017 227730 46918711304 4341 0.0190620 04102 894366687.6 592780047 136553.80
4102062901 04102 29 2017 Coquimbo 206027.8 2017 227730 46918711304 111 0.0004874 04102 22869086.0 77492880 698134.05
4102072002 04102 74 2017 Coquimbo 206027.8 2017 227730 46918711304 816 0.0035832 04102 168118686.3 159016935 194873.70
4102072011 04102 29 2017 Coquimbo 206027.8 2017 227730 46918711304 156 0.0006850 04102 32140337.1 77492880 496749.23
4102072021 04102 9 2017 Coquimbo 206027.8 2017 227730 46918711304 106 0.0004655 04102 21838947.0 35765184 337407.40
4102072023 04102 14 2017 Coquimbo 206027.8 2017 227730 46918711304 565 0.0024810 04102 116405708.0 47033225 83244.65
4102072024 04102 96 2017 Coquimbo 206027.8 2017 227730 46918711304 1893 0.0083125 04102 390010628.8 196703560 103911.02
4102082004 04102 46 2017 Coquimbo 206027.8 2017 227730 46918711304 296 0.0012998 04102 60984229.3 109336495 369380.05
4102082007 04102 6 2017 Coquimbo 206027.8 2017 227730 46918711304 52 0.0002283 04102 10713445.7 28397454 546104.89
4102082016 04102 1 2017 Coquimbo 206027.8 2017 227730 46918711304 14 0.0000615 04102 2884389.2 13058105 932721.78
4102082020 04102 4 2017 Coquimbo 206027.8 2017 227730 46918711304 8 0.0000351 04102 1648222.4 23011209 2876401.12
4102082032 04102 28 2017 Coquimbo 206027.8 2017 227730 46918711304 307 0.0013481 04102 63250535.2 75553719 246103.32
4102082901 04102 11 2017 Coquimbo 206027.8 2017 227730 46918711304 77 0.0003381 04102 15864140.7 40387217 524509.31
4102092026 04102 7 2017 Coquimbo 206027.8 2017 227730 46918711304 40 0.0001756 04102 8241112.1 30926746 773168.66
4102112017 04102 52 2017 Coquimbo 206027.8 2017 227730 46918711304 760 0.0033373 04102 156581129.4 120205322 158164.90
4102112025 04102 20 2017 Coquimbo 206027.8 2017 227730 46918711304 233 0.0010231 04102 48004477.8 59637403 255954.52
4102112029 04102 69 2017 Coquimbo 206027.8 2017 227730 46918711304 1312 0.0057612 04102 270308476.0 150313943 114568.55
4102112901 04102 3 2017 Coquimbo 206027.8 2017 227730 46918711304 45 0.0001976 04102 9271251.1 20069584 445990.76
4102122018 04102 5 2017 Coquimbo 206027.8 2017 227730 46918711304 460 0.0020199 04102 94772788.8 25769460 56020.56
4102132001 04102 1 2017 Coquimbo 206027.8 2017 227730 46918711304 61 0.0002679 04102 12567695.9 13058105 214067.29
4102142012 04102 6 2017 Coquimbo 206027.8 2017 227730 46918711304 288 0.0012647 04102 59336006.9 28397454 98602.27
4102152012 04102 3 2017 Coquimbo 206027.8 2017 227730 46918711304 50 0.0002196 04102 10301390.1 20069584 401391.68
4102152030 04102 11 2017 Coquimbo 206027.8 2017 227730 46918711304 122 0.0005357 04102 25135391.8 40387217 331042.76
4102162013 04102 32 2017 Coquimbo 206027.8 2017 227730 46918711304 252 0.0011066 04102 51919006.1 83256889 330384.48
4102162901 04102 2 2017 Coquimbo 206027.8 2017 227730 46918711304 19 0.0000834 04102 3914528.2 16841013 886369.10
4102182004 04102 1 2017 Coquimbo 206027.8 2017 227730 46918711304 19 0.0000834 04102 3914528.2 13058105 687268.68
4103012011 04103 1 2017 Andacollo 217096.4 2017 11044 2397612293 14 0.0012677 04103 3039349.2 13058105 932721.78
4103012014 04103 5 2017 Andacollo 217096.4 2017 11044 2397612293 55 0.0049801 04103 11940300.3 25769460 468535.63
4103012901 04103 5 2017 Andacollo 217096.4 2017 11044 2397612293 83 0.0075154 04103 18018998.6 25769460 310475.42
4103032005 04103 26 2017 Andacollo 217096.4 2017 11044 2397612293 537 0.0486237 04103 116580749.8 71645724 133418.48
4103032013 04103 3 2017 Andacollo 217096.4 2017 11044 2397612293 72 0.0065194 04103 15630938.5 20069584 278744.22
4103032901 04103 1 2017 Andacollo 217096.4 2017 11044 2397612293 31 0.0028070 04103 6729987.4 13058105 421229.19
4104012013 04104 2 2017 La Higuera 231674.2 2017 4241 982530309 53 0.0124971 04104 12278732.9 16841013 317754.96
4104022002 04104 22 2017 La Higuera 231674.2 2017 4241 982530309 839 0.1978307 04104 194374659.1 63693775 75916.30
4104022006 04104 2 2017 La Higuera 231674.2 2017 4241 982530309 43 0.0101391 04104 9961990.9 16841013 391651.46
4104022901 04104 1 2017 La Higuera 231674.2 2017 4241 982530309 19 0.0044801 04104 4401809.9 13058105 687268.68
4104032014 04104 1 2017 La Higuera 231674.2 2017 4241 982530309 66 0.0155624 04104 15290497.6 13058105 197850.08
4104042003 04104 6 2017 La Higuera 231674.2 2017 4241 982530309 267 0.0629568 04104 61857013.1 28397454 106357.51
4104042028 04104 1 2017 La Higuera 231674.2 2017 4241 982530309 52 0.0122613 04104 12047058.7 13058105 251117.40
4104042901 04104 2 2017 La Higuera 231674.2 2017 4241 982530309 18 0.0042443 04104 4170135.7 16841013 935611.83
4104052004 04104 28 2017 La Higuera 231674.2 2017 4241 982530309 144 0.0339543 04104 33361085.7 75553719 524678.60
4104052017 04104 13 2017 La Higuera 231674.2 2017 4241 982530309 231 0.0544683 04104 53516741.7 44849935 194155.56
4104052023 04104 10 2017 La Higuera 231674.2 2017 4241 982530309 311 0.0733318 04104 72050678.2 38099008 122504.85
4104062004 04104 1 2017 La Higuera 231674.2 2017 4241 982530309 3 0.0007074 04104 695022.6 13058105 4352701.65
4104062901 04104 2 2017 La Higuera 231674.2 2017 4241 982530309 52 0.0122613 04104 12047058.7 16841013 323865.63
4104072015 04104 7 2017 La Higuera 231674.2 2017 4241 982530309 21 0.0049517 04104 4865158.3 30926746 1472702.21
4104072018 04104 2 2017 La Higuera 231674.2 2017 4241 982530309 72 0.0169771 04104 16680542.9 16841013 233902.96


Guardamos:

saveRDS(h_y_m_comuna_corr_01, "P15/region_04_P15_r.rds")