11.07.2015 Views

Conociendo la base de datos. Encuesta Nacional de ... - Inegi

Conociendo la base de datos. Encuesta Nacional de ... - Inegi

Conociendo la base de datos. Encuesta Nacional de ... - Inegi

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

*Toma el Ingreso <strong>de</strong> <strong>la</strong> Tab<strong>la</strong> Hogares, y le agrega el ingreso <strong>de</strong> <strong>la</strong>s dos consultas anterioresSELECT a.Folioviv,a.Foliohog,IIF(a.Estim32tri>0,a.Estim32tri,0) AS Ing_1,a.Factor,b.Ing_2 FROM Hogaresa LEFT JOIN Tab<strong>la</strong>_02 b ON (a.Folioviv=b.Folioviv AND a.Foliohog=b.Foliohog) INTO CURSOR Tab<strong>la</strong>_xSELECT a.*,0000000000.00 as Ing_tri,b.Ing_3 FROM Tab<strong>la</strong>_x a LEFT JOIN Tab<strong>la</strong>_03 b ON (a.Folioviv=b.Folioviv AND a.Foliohog=b.Foliohog) INTO TABLE Tab<strong>la</strong>_00REPLACE ALL Ing_2 WITH 0 FOR ISNULL(Ing_2)REPLACE ALL Ing_3 WITH 0 FOR ISNULL(Ing_3)REPLACE ALL Ing_tri WITH (Ing_1+Ing_2+Ing_3)*Genera el total <strong>de</strong> Hogares e Ingreso, <strong>de</strong>l Tabu<strong>la</strong>do 3.1; con <strong>la</strong>s Tab<strong>la</strong>s <strong>de</strong> explotaciónSELECT SUM(Factor) AS Hogares,ROUND(SUM(Ing_tri*Factor)/1000,0) AS Ingreso FROM Tab<strong>la</strong>_00*Genera el total <strong>de</strong> Hogares e Ingreso, <strong>de</strong>l Tabu<strong>la</strong>do 3.1; con <strong>la</strong> Tab<strong>la</strong> ConcentradoSELECT SUM(Factor) AS Hogares,ROUND(SUM(Ingcor*Factor)/1000,0) AS Ingreso FROM ConcentradoINEGI. <strong>Encuesta</strong> <strong>Nacional</strong> <strong>de</strong> Ingresos y Gastos <strong>de</strong> los Hogares 2008. <strong>Conociendo</strong> <strong>la</strong> <strong>base</strong> <strong>de</strong> <strong>datos</strong>2.6.2 Ejemplos <strong>de</strong> consultas con el software SPSSEn este software se pue<strong>de</strong>n realizar <strong>la</strong>s consultas o análisis <strong>de</strong>s<strong>de</strong> los menús <strong>de</strong>l programa o mediante sintaxis(comandos) como se muestra a continuación.Ejemplo 1: Calcu<strong>la</strong>r el total <strong>de</strong> hogares muéstrales y expandidos.GET FILE='C:\ENIGH_2008\hogares08.sav'.FREQUENCIES VARIABLES=folioviv/FORMAT=NOTABLE/STATISTICS=SUM/ORDER=ANALYSIS.WEIGHT BY factor.FREQUENCIES VARIABLES=folioviv/FORMAT=NOTABLE/STATISTICS=SUM/ORDER=ANALYSIS.16foliovivEstadísticosN Válidos 29468foliovivPerdidos 0EstadísticosN Válidos 26732594Perdidos 0

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!