ANÁLISIS DE REGRESIÓN. Caso 1. Pegado de bases para un conjunto de datos rectangulares de igual tamaño

ANÁLISIS DE REGRESIÓN JFIA /FVP Comando merge Caso 1. Pegado de bases para un conjunto de datos rectangulares de igual tamaño Sintaxis use "C:\RUTA...
0 downloads 0 Views 175KB Size
ANÁLISIS DE REGRESIÓN

JFIA /FVP

Comando merge Caso 1. Pegado de bases para un conjunto de datos rectangulares de igual tamaño

Sintaxis use "C:\RUTA DEL USUARIO\encuesta2.dta", clear describe list sort mun list save mio, replace use "C:\RUTA DEL USUARIO\encuesta1.dta", clear describe list sort mun list merge mun using mio variable mun does not uniquely identify observations in the master data list erase mio.dta tab _merge drop _merge

1

2010

BASES DE DATOS

Caso 2. Pegado de bases para un conjunto de datos no rectangulares (o con número de observaciones diferente)

Algunos respondientes se negaron a participar en la segunda parte de la encuesta, a la vez que nuevos respondientes se incorporaron

Sintaxis use "C:\TINO R\CURSO_STATA_INTERTRIMESTRAL\encuesta3.dta", clear describe list sort estado save mio1, replace use "C:\TINO R\CURSO_STATA_INTERTRIMESTRAL\encuesta4.dta", clear describe list sort estado merge estado using mio1 describe, short tab merge keep if _merge=3 describe list tab _merge erase mio1.dta

2

ANÁLISIS DE REGRESIÓN

JFIA /FVP

Caso 3. Pegado de bases para datos individuales y agregados

Común en encuestas de hogares

Integración de las bases sdemt305.dta y coe1T305.dta de la

ENOE

http://www.inegi.org.mx/sistemas/usuarios/login.aspx?s=est&c=&sistema=enoe

set mem 300m

1ª base

use "C:\RUTA\sdemt209.dta", clear keep if ent==9 sort cd_a ent con v_sel n_hog h_mud n_ren save "C:\RUTA\sdem_df305.dta", replace

2ª base

use "C:\RUTA\ coe1t209.dta", clear keep if ent==9 sort cd_a ent con v_sel n_hog h_mud n_ren

merge cd_a ent con v_sel n_hog h_mud n_ren using "C:\RUTA\sdem_df305.dta" drop _merge erase sdem_df305.dta

3

2010

BASES DE DATOS

RESULTADOS: CASO 1 use "C:\TINO R\CURSO_STATA_INTERTRIMESTRAL\encuesta2.dta", clear describe Contains data from C:\TINO R\CURSO_STATA_INTERTRIMESTRAL\encuesta2.dta obs: 29 vars: 7 14 Apr 2010 01:55 size: 406 (99.9% of memory free) ------------------------------------------------------------------------------storage display value variable name type format label variable label ------------------------------------------------------------------------------mun int %8.0g ageb int %8.0g paren byte %8.0g ecivil byte %8.0g ing int %8.0g e_con byte %8.0g ocu byte %8.0g ------------------------------------------------------------------------------Sorted by: sort mun list

1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29.

+---------------------------------------------------+ | mun ageb paren ecivil ing e_con ocu | |---------------------------------------------------| | 1 4291 3 6 . 6 . | | 1 712 1 3 1100 3 5 | | 4 4092 3 6 600 6 5 | | 5 1097 2 5 . 5 . | | 5 171 2 5 . 5 . | |---------------------------------------------------| | 7 226 2 5 600 5 5 | | 10 990 1 5 . 5 . | | 10 1650 1 4 1200 4 5 | | 11 157 1 4 . 4 . | | 14 2102 1 2 1250 2 5 | |---------------------------------------------------| | 15 288 1 5 600 5 5 | | 16 25 1 5 1000 5 7 | | 20 266 1 5 300 5 4 | | 27 . 3 6 988 6 4 | | 27 144 1 5 . 5 . | |---------------------------------------------------| | 28 2643 2 5 . 5 . | | 30 . 3 6 800 6 4 | | 33 3430 1 5 4500 5 5 | | 37 2319 1 6 . 6 . | | 39 4245 3 6 . 6 . | |---------------------------------------------------| | 39 654 1 6 . 6 . | | 44 167 3 6 900 6 7 | | 46 . 2 5 . 5 . | | 53 880 1 3 8000 3 1 | | 53 486 1 3 1200 3 5 | |---------------------------------------------------| | 57 1686 1 5 1500 5 5 | | 58 1876 1 6 . 6 . | | 114 3807 1 3 14000 3 1 | | 120 710 2 5 4200 5 3 | +---------------------------------------------------+

4

ANÁLISIS DE REGRESIÓN

JFIA /FVP

sort mun list

1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29.

+---------------------------------------------------+ | mun ageb paren ecivil ing e_con ocu | |---------------------------------------------------| | 1 712 1 3 1100 3 5 | | 1 4291 3 6 . 6 . | | 4 4092 3 6 600 6 5 | | 5 171 2 5 . 5 . | | 5 1097 2 5 . 5 . | |---------------------------------------------------| | 7 226 2 5 600 5 5 | | 10 990 1 5 . 5 . | | 10 1650 1 4 1200 4 5 | | 11 157 1 4 . 4 . | | 14 2102 1 2 1250 2 5 | |---------------------------------------------------| | 15 288 1 5 600 5 5 | | 16 25 1 5 1000 5 7 | | 20 266 1 5 300 5 4 | | 27 144 1 5 . 5 . | | 27 . 3 6 988 6 4 | |---------------------------------------------------| | 28 2643 2 5 . 5 . | | 30 . 3 6 800 6 4 | | 33 3430 1 5 4500 5 5 | | 37 2319 1 6 . 6 . | | 39 654 1 6 . 6 . | |---------------------------------------------------| | 39 4245 3 6 . 6 . | | 44 167 3 6 900 6 7 | | 46 . 2 5 . 5 . | | 53 486 1 3 1200 3 5 | | 53 880 1 3 8000 3 1 | |---------------------------------------------------| | 57 1686 1 5 1500 5 5 | | 58 1876 1 6 . 6 . | | 114 3807 1 3 14000 3 1 | | 120 710 2 5 4200 5 3 | +---------------------------------------------------+

save mio, replace (note: file mio.dta not found) file mio.dta saved

5

2010

BASES DE DATOS

use "C:\TINO R\CURSO_STATA_INTERTRIMESTRAL\encuesta1.dta", clear describe Contains data from C:\TINO R\CURSO_STATA_INTERTRIMESTRAL\encuesta1.dta obs: 29 vars: 12 14 Apr 2010 01:37 size: 1,044 (99.9% of memory free) ------------------------------------------------------------------------------storage display value variable name type format label variable label ------------------------------------------------------------------------------mun int %8.0g estr int %8.0g ageb int %8.0g control long %12.0g viv byte %8.0g hogar byte %8.0g rengln byte %8.0g renglón genero byte %8.0g edad byte %8.0g esc str12 %12s estado byte %8.0g factor long %12.0g ------------------------------------------------------------------------------Sorted by:

list

1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29.

+-----------------------------------------------------------------------------------------------------+ | mun estr ageb control viv hogar rengln genero edad esc estado factor | |-----------------------------------------------------------------------------------------------------| | 7 8002 226 118521 1 1 1 1 19 secundaria 11 5389 | | 14 8001 2102 227599 1 1 1 1 19 preparatoria 22 16767 | | 53 8002 486 167148 1 1 1 1 19 secundaria 16 8665 | | 120 8003 710 147463 1 1 1 1 21 licenciatura 14 7650 | | 5 8001 1097 237502 1 1 1 1 22 primaria 23 4002 | |-----------------------------------------------------------------------------------------------------| | 39 8001 4245 147468 1 1 1 1 22 primaria 14 14797 | | 58 8003 1876 157392 1 1 1 1 22 licenciatura 15 5867 | | 4 8003 4092 27715 1 1 4 2 20 preparatoria 22 9508 | | 30 8001 . 118832 1 1 4 2 20 primaria 5 6586 | | 46 8002 . 158821 1 1 4 2 25 primaria 8 1175 | |-----------------------------------------------------------------------------------------------------| | 44 8002 167 307908 1 1 4 2 27 licenciatura 11 7336 | | 11 8001 157 227060 1 1 4 2 31 primaria 16 35374 | | 39 8001 654 197755 1 1 4 2 31 licenciatura 32 9563 | | 10 8002 990 258822 1 1 4 2 34 secundaria 27 4258 | | 10 8002 1650 97357 1 1 4 2 34 secundaria 1 2136 | |-----------------------------------------------------------------------------------------------------| | 1 8003 4291 127540 1 1 4 2 80 0 6 4313 | | 20 8002 266 117389 1 1 5 1 19 secundaria 19 9157 | | 1 8001 712 17029 1 1 5 1 22 licenciatura 19 6836 | | 27 8001 . 119413 1 1 1 1 26 licenciatura 11 6600 | | 33 8002 3430 157398 1 1 1 1 26 primaria 15 33796 | |-----------------------------------------------------------------------------------------------------| | 16 8001 25 318820 1 1 1 1 27 0 31 5230 | | 37 8001 2319 88671 1 1 1 1 27 preparatoria 8 13662 | | 53 8001 880 167426 1 1 1 1 27 preparatoria 16 13425 | | 114 8002 3807 217823 1 1 1 1 27 licenciatura 21 22341 | | 5 8002 171 28814 1 1 1 1 28 secundaria 2 2622 | |-----------------------------------------------------------------------------------------------------| | 15 8001 288 188821 1 1 1 1 28 primaria 18 5306 | | 27 8002 144 119476 1 1 1 1 28 preparatoria 11 3659 | | 28 8001 2643 247393 1 1 1 1 29 licenciatura 24 37147 | | 57 8001 1686 157017 1 1 1 1 29 secundaria 15 6024 | +-----------------------------------------------------------------------------------------------------+

6

ANÁLISIS DE REGRESIÓN

JFIA /FVP

sort mun list

1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29.

+-----------------------------------------------------------------------------------------------------+ | mun estr ageb control viv hogar rengln genero edad esc estado factor | |-----------------------------------------------------------------------------------------------------| | 1 8003 4291 127540 1 1 4 2 80 0 6 4313 | | 1 8001 712 17029 1 1 5 1 22 licenciatura 19 6836 | | 4 8003 4092 27715 1 1 4 2 20 preparatoria 22 9508 | | 5 8001 1097 237502 1 1 1 1 22 primaria 23 4002 | | 5 8002 171 28814 1 1 1 1 28 secundaria 2 2622 | |-----------------------------------------------------------------------------------------------------| | 7 8002 226 118521 1 1 1 1 19 secundaria 11 5389 | | 10 8002 1650 97357 1 1 4 2 34 secundaria 1 2136 | | 10 8002 990 258822 1 1 4 2 34 secundaria 27 4258 | | 11 8001 157 227060 1 1 4 2 31 primaria 16 35374 | | 14 8001 2102 227599 1 1 1 1 19 preparatoria 22 16767 | |-----------------------------------------------------------------------------------------------------| | 15 8001 288 188821 1 1 1 1 28 primaria 18 5306 | | 16 8001 25 318820 1 1 1 1 27 0 31 5230 | | 20 8002 266 117389 1 1 5 1 19 secundaria 19 9157 | | 27 8002 144 119476 1 1 1 1 28 preparatoria 11 3659 | | 27 8001 . 119413 1 1 1 1 26 licenciatura 11 6600 | |-----------------------------------------------------------------------------------------------------| | 28 8001 2643 247393 1 1 1 1 29 licenciatura 24 37147 | | 30 8001 . 118832 1 1 4 2 20 primaria 5 6586 | | 33 8002 3430 157398 1 1 1 1 26 primaria 15 33796 | | 37 8001 2319 88671 1 1 1 1 27 preparatoria 8 13662 | | 39 8001 654 197755 1 1 4 2 31 licenciatura 32 9563 | |-----------------------------------------------------------------------------------------------------| | 39 8001 4245 147468 1 1 1 1 22 primaria 14 14797 | | 44 8002 167 307908 1 1 4 2 27 licenciatura 11 7336 | | 46 8002 . 158821 1 1 4 2 25 primaria 8 1175 | | 53 8002 486 167148 1 1 1 1 19 secundaria 16 8665 | | 53 8001 880 167426 1 1 1 1 27 preparatoria 16 13425 | |-----------------------------------------------------------------------------------------------------| | 57 8001 1686 157017 1 1 1 1 29 secundaria 15 6024 | | 58 8003 1876 157392 1 1 1 1 22 licenciatura 15 5867 | | 114 8002 3807 217823 1 1 1 1 27 licenciatura 21 22341 | | 120 8003 710 147463 1 1 1 1 21 licenciatura 14 7650 | +-----------------------------------------------------------------------------------------------------+

merge mun using mio variable mun does not uniquely identify observations in the master data list

1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29.

+---------------------------------------------------------------------------------------------------------------------------------------------+ | mun estr ageb control viv hogar rengln genero edad esc estado factor paren ecivil ing ocu _merge | |---------------------------------------------------------------------------------------------------------------------------------------------| | 1 8003 4291 127540 1 1 4 2 80 0 6 4313 1 3 1100 5 3 | | 1 8001 712 17029 1 1 5 1 22 licenciatura 19 6836 3 6 . . 3 | | 4 8003 4092 27715 1 1 4 2 20 preparatoria 22 9508 3 6 600 5 3 | | 5 8001 1097 237502 1 1 1 1 22 primaria 23 4002 2 5 . . 3 | | 5 8002 171 28814 1 1 1 1 28 secundaria 2 2622 2 5 . . 3 | |---------------------------------------------------------------------------------------------------------------------------------------------| | 7 8002 226 118521 1 1 1 1 19 secundaria 11 5389 2 5 600 5 3 | | 10 8002 1650 97357 1 1 4 2 34 secundaria 1 2136 1 5 . . 3 | | 10 8002 990 258822 1 1 4 2 34 secundaria 27 4258 1 4 1200 5 3 | | 11 8001 157 227060 1 1 4 2 31 primaria 16 35374 1 4 . . 3 | | 14 8001 2102 227599 1 1 1 1 19 preparatoria 22 16767 1 2 1250 5 3 | |---------------------------------------------------------------------------------------------------------------------------------------------| | 15 8001 288 188821 1 1 1 1 28 primaria 18 5306 1 5 600 5 3 | | 16 8001 25 318820 1 1 1 1 27 0 31 5230 1 5 1000 7 3 | | 20 8002 266 117389 1 1 5 1 19 secundaria 19 9157 1 5 300 4 3 | | 27 8002 144 119476 1 1 1 1 28 preparatoria 11 3659 1 5 . . 3 | | 27 8001 . 119413 1 1 1 1 26 licenciatura 11 6600 3 6 988 4 3 | |---------------------------------------------------------------------------------------------------------------------------------------------| | 28 8001 2643 247393 1 1 1 1 29 licenciatura 24 37147 2 5 . . 3 | | 30 8001 . 118832 1 1 4 2 20 primaria 5 6586 3 6 800 4 3 | | 33 8002 3430 157398 1 1 1 1 26 primaria 15 33796 1 5 4500 5 3 | | 37 8001 2319 88671 1 1 1 1 27 preparatoria 8 13662 1 6 . . 3 | | 39 8001 654 197755 1 1 4 2 31 licenciatura 32 9563 1 6 . . 3 | |---------------------------------------------------------------------------------------------------------------------------------------------| | 39 8001 4245 147468 1 1 1 1 22 primaria 14 14797 3 6 . . 3 | | 44 8002 167 307908 1 1 4 2 27 licenciatura 11 7336 3 6 900 7 3 | | 46 8002 . 158821 1 1 4 2 25 primaria 8 1175 2 5 . . 3 | | 53 8002 486 167148 1 1 1 1 19 secundaria 16 8665 1 3 1200 5 3 | | 53 8001 880 167426 1 1 1 1 27 preparatoria 16 13425 1 3 8000 1 3 | |---------------------------------------------------------------------------------------------------------------------------------------------| | 57 8001 1686 157017 1 1 1 1 29 secundaria 15 6024 1 5 1500 5 3 | | 58 8003 1876 157392 1 1 1 1 22 licenciatura 15 5867 1 6 . . 3 | | 114 8002 3807 217823 1 1 1 1 27 licenciatura 21 22341 1 3 14000 1 3 | | 120 8003 710 147463 1 1 1 1 21 licenciatura 14 7650 2 5 4200 3 3 | +---------------------------------------------------------------------------------------------------------------------------------------------+

erase mio.dta

7

2010

BASES DE DATOS

tab _merge _merge | Freq. Percent Cum. ------------+----------------------------------3 | 29 100.00 100.00 ------------+----------------------------------Total | 29 100.00

8

ANÁLISIS DE REGRESIÓN

JFIA /FVP

RESULTADOS CASO 2 use "C:\TINO R\CURSO_STATA_INTERTRIMESTRAL\encuesta3.dta", clear describe Contains data from C:\TINO R\CURSO_STATA_INTERTRIMESTRAL\encuesta3.dta obs: 30 vars: 6 14 Apr 2010 03:27 size: 330 (99.9% of memory free) ------------------------------------------------------------------------------storage display value variable name type format label variable label ------------------------------------------------------------------------------ent byte %8.0g par byte %8.0g sex byte %8.0g eda byte %8.0g ing int %8.0g tloc byte %8.0g ------------------------------------------------------------------------------Sorted by: list

1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30.

+--------------------------------------+ | ent par sex eda ing tloc | |--------------------------------------| | 5 2 2 40 600 1 | | 14 1 2 36 1250 1 | | 1 1 2 39 1200 1 | | 11 2 2 60 4200 1 | | 12 2 2 54 . 1 | |--------------------------------------| | 12 3 1 21 . 1 | | 3 1 1 20 . 1 | | 12 3 1 20 600 1 | | 25 3 2 26 800 1 | | 21 2 2 54 . 1 | |--------------------------------------| | 27 3 1 29 900 1 | | 15 1 2 68 . 1 | | 19 1 1 20 . 1 | | 25 1 2 51 . 1 | | 12 1 2 63 1200 1 | |--------------------------------------| | 15 3 1 26 . 1 | | 24 1 1 83 300 1 | | 21 1 2 49 1100 1 | | 16 3 2 56 988 1 | | 15 1 1 38 4500 1 | |--------------------------------------| | 12 1 1 50 1000 1 | | 20 1 1 18 . 1 | | 27 1 1 34 8000 1 | | 9 1 2 49 14000 1 | | 9 2 2 21 . 1 | |--------------------------------------| | 11 1 1 47 600 1 | | 6 1 1 49 . 1 | | 13 2 2 24 . 1 | | 1 1 1 41 1500 1 | | 1 2 2 51 200 1 | +--------------------------------------+

sort estado save mio1, replace (note: file mio1.dta not found) file mio1.dta saved

9

2010

BASES DE DATOS

use "C:\TINO R\CURSO_STATA_INTERTRIMESTRAL\encuesta4.dta", clear describe Contains data from C:\TINO R\CURSO_STATA_INTERTRIMESTRAL\encuesta4.dta obs: 52 vars: 4 14 Apr 2010 03:26 size: 572 (99.9% of memory free) ------------------------------------------------------------------------------storage display value variable name type format label variable label ------------------------------------------------------------------------------estado byte %8.0g factor long %12.0g alfa byte %8.0g esc byte %8.0g ------------------------------------------------------------------------------Sorted by:

list

1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52.

+------------------------------+ | estado factor alfa esc | |------------------------------| | 11 5389 2 2 | | 22 16767 2 2 | | 16 8665 2 2 | | 14 7650 2 4 | | 23 4002 1 4 | |------------------------------| | 14 14797 2 3 | | 15 5867 2 0 | | 22 9508 2 2 | | 5 6586 2 2 | | 8 1175 2 2 | |------------------------------| | 11 7336 2 2 | | 16 35374 2 0 | | 32 9563 2 3 | | 27 4258 2 7 | | 1 2136 2 2 | |------------------------------| | 6 4313 2 6 | | 19 9157 2 7 | | 19 6836 2 2 | | 11 6600 2 0 | | 15 33796 2 4 | |------------------------------| | 31 5230 2 2 | | 8 13662 2 4 | | 16 13425 2 0 | | 21 22341 2 2 | | 2 2622 2 3 | |------------------------------| | 18 5306 2 7 | | 11 3659 2 2 | | 24 37147 2 0 | | 15 6024 2 2 | | 2 11139 2 3 | |------------------------------| | 12 . 2 4 | | 2 . 2 3 | | 11 . 2 3 | | 14 . 2 3 | | 15 . 2 2 | |------------------------------| | 14 . 2 7 | | 14 . 2 4 | | 16 . 2 4 | | 26 . 2 3 | | 25 . 2 5 | |------------------------------| | 4 . 2 2 | | 27 . 2 3 | | 19 . 2 3 | | 14 . 2 7 | | 15 . 2 2 | |------------------------------| | 14 . 2 0 | | 15 . 2 2 | | 9 . 2 3 | | 9 . 2 4 | | 9 . 2 3 | |------------------------------| | 5 . 2 3 | | 19 . 2 3 | +------------------------------+

sort estado merge estado using mio1, nokeep variable estado does not uniquely identify observations in the master data

10

ANÁLISIS DE REGRESIÓN

JFIA /FVP

variable estado does not uniquely identify observations in mio1.dta list

1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54. 55. 56. 57. 58. 59. 60.

+------------------------------------------------------------------+ | estado factor alfa esc sex eda ing tloc _merge | |------------------------------------------------------------------| | 1 2136 2 2 2 51 200 1 3 | | 2 2622 2 3 . . . . 1 | | 2 11139 2 3 . . . . 1 | | 2 . 2 3 . . . . 1 | | 4 . 2 2 . . . . 1 | |------------------------------------------------------------------| | 5 6586 2 2 2 40 600 1 3 | | 5 . 2 3 2 40 600 1 3 | | 6 4313 2 6 1 49 . 1 3 | | 8 1175 2 2 . . . . 1 | | 8 13662 2 4 . . . . 1 | |------------------------------------------------------------------| | 9 . 2 3 2 21 . 1 3 | | 9 . 2 4 2 49 14000 1 3 | | 9 . 2 3 2 49 14000 1 3 | | 11 7336 2 2 1 47 600 1 3 | | 11 5389 2 2 2 60 4200 1 3 | |------------------------------------------------------------------| | 11 3659 2 2 2 60 4200 1 3 | | 11 6600 2 0 2 60 4200 1 3 | | 11 . 2 3 2 60 4200 1 3 | | 12 . 2 4 1 50 1000 1 3 | | 14 . 2 4 2 36 1250 1 3 | |------------------------------------------------------------------| | 14 . 2 7 2 36 1250 1 3 | | 14 7650 2 4 2 36 1250 1 3 | | 14 14797 2 3 2 36 1250 1 3 | | 14 . 2 3 2 36 1250 1 3 | | 14 . 2 7 2 36 1250 1 3 | |------------------------------------------------------------------| | 14 . 2 0 2 36 1250 1 3 | | 15 33796 2 4 1 38 4500 1 3 | | 15 5867 2 0 2 68 . 1 3 | | 15 . 2 2 1 26 . 1 3 | | 15 6024 2 2 1 26 . 1 3 | |------------------------------------------------------------------| | 15 . 2 2 1 26 . 1 3 | | 15 . 2 2 1 26 . 1 3 | | 16 13425 2 0 2 56 988 1 3 | | 16 . 2 4 2 56 988 1 3 | | 16 35374 2 0 2 56 988 1 3 | |------------------------------------------------------------------| | 16 8665 2 2 2 56 988 1 3 | | 18 5306 2 7 . . . . 1 | | 19 9157 2 7 1 20 . 1 3 | | 19 . 2 3 1 20 . 1 3 | | 19 . 2 3 1 20 . 1 3 | |------------------------------------------------------------------| | 19 6836 2 2 1 20 . 1 3 | | 21 22341 2 2 2 49 1100 1 3 | | 22 9508 2 2 . . . . 1 | | 22 16767 2 2 . . . . 1 | | 23 4002 1 4 . . . . 1 | |------------------------------------------------------------------| | 24 37147 2 0 1 83 300 1 3 | | 25 . 2 5 2 26 800 1 3 | | 26 . 2 3 . . . . 1 | | 27 . 2 3 1 34 8000 1 3 | | 27 4258 2 7 1 29 900 1 3 | |------------------------------------------------------------------| | 31 5230 2 2 . . . . 1 | | 32 9563 2 3 . . . . 1 | | 1 2136 2 2 2 39 1200 1 3 | | 1 2136 2 2 1 41 1500 1 3 | | 12 . 2 4 2 54 . 1 3 | |------------------------------------------------------------------| | 12 . 2 4 1 20 600 1 3 | | 12 . 2 4 1 21 . 1 3 | | 12 . 2 4 2 63 1200 1 3 | | 21 22341 2 2 2 54 . 1 3 | | 25 . 2 5 2 51 . 1 3 | +------------------------------------------------------------------+

tab _merge _merge | Freq. Percent Cum. ------------+----------------------------------1 | 13 21.67 21.67 3 | 47 78.33 100.00 ------------+----------------------------------Total | 60 100.00

describe Contains data from C:\TINO R\CURSO_STATA_INTERTRIMESTRAL\encuesta4.dta obs: 60

11

2010

BASES DE DATOS

vars: 9 14 Apr 2010 03:26 size: 1,020 (99.9% of memory free) ------------------------------------------------------------------------------storage display value variable name type format label variable label ------------------------------------------------------------------------------estado byte %8.0g factor long %12.0g alfa byte %8.0g esc byte %8.0g sex byte %8.0g eda byte %8.0g ing int %8.0g tloc byte %8.0g _merge byte %8.0g ------------------------------------------------------------------------------Sorted by: Note: dataset has changed since last saved

12

ANÁLISIS DE REGRESIÓN

JFIA /FVP

Datos de la encuesta 1 mun

estr

ageb control viv hogar renglón genero edad

007 014 053 120 005 039 058 004 030 046 044 011 039 010 010 001 020 001 027 033 016 037 053 114 005 015 027 028

8002 8001 8002 8003 8001 8001 8003 8003 8001 8002 8002 8001 8001 8002 8002 8003 8002 8001 8001 8002 8001 8001 8001 8002 8002 8001 8002 8001

0226 2102 0486 0710 1097 4245 1876 4092 021A 003A 0167 0157 0654 0990 1650 4291 0266 0712 020A 3430 0025 2319 0880 3807 0171 0288 0144 2643

118521 227599 167148 147463 237502 147468 157392 027715 118832 158821 307908 227060 197755 258822 097357 127540 117389 017029 119413 157398 318820 088671 167426 217823 028814 188821 119476 247393

01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01

01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01

01 01 01 01 01 01 01 04 04 04 04 04 04 04 04 04 05 05 01 01 01 01 01 01 01 01 01 01

1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1

19 19 19 21 22 22 22 20 20 25 27 31 31 34 34 80 19 22 26 26 27 27 27 27 28 28 28 29

secundaria preparatoria secundaria licenciatura primaria primaria licenciatura preparatoria primaria primaria licenciatura primaria licenciatura secundaria secundaria

057

8001

1686 157017

01

01

01

1

29

13

esc

estado factor

preparatoria preparatoria licenciatura secundaria primaria preparatoria licenciatura

11 22 16 14 23 14 15 22 5 8 11 16 32 27 1 6 19 19 11 15 31 8 16 21 2 18 11 24

5389 16767 8665 7650 4002 14797 5867 9508 6586 1175 7336 35374 9563 4258 2136 4313 9157 6836 6600 33796 5230 13662 13425 22341 2622 5306 3659 37147

secundaria

15

6024

secundaria licenciatura licenciatura primaria

2010

BASES DE DATOS

Datos de la encuesta 2 mun 007 014 053 120 005 039 058 004 030 046 044 011 039 010 010 001 020 001 027 033 016 037 053 114 005 015 027 028 057

ageb paren ecivil ing e_con ocu tloc 0226 2 5 600 5 5 4 2102 1 2 1250 2 5 4 0486 1 3 1200 3 5 4 0710 2 5 4200 5 3 4 1097 2 5 5 4 4245 3 6 6 4 1876 1 6 6 1 4092 3 6 600 6 5 1 021A 3 6 800 6 4 1 003A 2 5 5 1 0167 3 6 900 6 7 1 0157 1 4 4 1 0654 1 6 6 1 1 5 5 1 0990 1 4 1200 4 5 3 1650 4291 3 6 6 3 0266 1 5 300 5 4 3 1 3 1100 3 5 3 0712 020A 3 6 988 6 4 3 3430 1 5 4500 5 5 2 1 5 1000 5 7 2 0025 2319 1 6 6 2 0880 1 3 8000 3 1 2 1 3 14000 3 1 2 3807 0171 2 5 5 2 1 5 600 5 5 2 0288 0144 1 5 5 2 2643 2 5 5 2 1686 1 5 1500 5 5 2

14

ANÁLISIS DE REGRESIÓN

JFIA /FVP

Datos de la encuesta 3 estado paren genero edad ing tloc 5 2 2 40 600 1 14 1 2 36 1250 1 1 1 2 39 1200 1 11 2 2 60 4200 1 12 2 2 54 1 12 3 1 21 1 3 1 1 20 1 12 3 1 20 600 1 25 3 2 26 800 1 21 2 2 54 1 27 3 1 29 900 1 15 1 2 68 1 19 1 1 20 1 25 1 2 51 1 12 1 2 63 1200 1 15 3 1 26 1 24 1 1 83 300 1 21 1 2 49 1100 1 16 3 2 56 988 1 15 1 1 38 4500 1 12 1 1 50 1000 1 20 1 1 18 1 27 1 1 34 8000 1 9 1 2 49 #### 1 9 2 2 21 1 11 1 1 47 600 1 6 1 1 49 1 13 2 2 24 1 1 1 1 41 1500 1 1 2 2 51 200 1

15

2010

BASES DE DATOS

Datos de la encuesta 4 estado 11 22 16 14 23 14 15 22 5 8 11 16 32 27 1 6 19 19 11 15 31 8 16 21 2 18 11 24 15 2

factor 5389 16767 8665 7650 4002 14797 5867 9508 6586 1175 7336 35374 9563 4258 2136 4313 9157 6836 6600 33796 5230 13662 13425 22341 2622 5306 3659 37147 6024 11139

12 2 11 14 15 14 14 16 26 25 4

5,217 23,955 12,092 10,512 6,757 2,325 23,506 5,811 1,639 5,766 1,348

alfa 2 2 2 2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2

16

esc 2 2 2 4 4 3 0 2 2 2 2 0 3 7 2 6 7 2 0 4 2 4 0 2 3 7 2 0 2 3 4 3 3 3 2 7 4 4 3 5 2

ANÁLISIS DE REGRESIÓN

JFIA /FVP

27 19 14 15 14 15 9 9 9 5 19

2 2 2 2 2 2 2 2 2 2 2

1,493 21,956 21,279 3,393 44,793 38,177 141,273 9,463 8,323 25,892 21,041

17

3 3 7 2 0 2 3 4 3 3 3