Presentation is loading. Please wait.

Presentation is loading. Please wait.

MICS Data Processing Workshop Exporting to SPSS. Secondary Data Processing Flow Export Data from CSPRO Import Data into SPSS Recode Variables Add Sample.

Similar presentations


Presentation on theme: "MICS Data Processing Workshop Exporting to SPSS. Secondary Data Processing Flow Export Data from CSPRO Import Data into SPSS Recode Variables Add Sample."— Presentation transcript:

1 MICS Data Processing Workshop Exporting to SPSS

2 Secondary Data Processing Flow Export Data from CSPRO Import Data into SPSS Recode Variables Add Sample Weights, Wealth Index and GPS Data Run Tables

3 Secondary Data Processing Exporting data from CSPRO – Create SPSS data file and syntax file from CSPRO data file and dictionary Importing data to SPSS – Executing syntax file created by CSPRO Recoding variables – Creating new variables and recoding old variables

4 Secondary Data Processing Adding sample weights – Sample weights are added from weights spreadsheet Adding wealth index – Wealth index calculated then added to files Adding GPS data – Geographic location data added to files Tabulation – Tables are generated from the analysis files

5 The Export Application A batch application – uses export to command Creates SPSS data and description files for 4 types of case – Household (HH) – Household member (HL) – Woman (WM) – Under-five (CH)

6 The Household Export Syntax: export to myhh HH1,HH2,MODHH, MODTO, MODWS, MODHC, MODTN, MODOV, MODCD, MODSI; Creates – c:\mics\spss\myhh.sps – c:\mics\spss\myhh.dat

7 The Woman Export Syntax: if HL6(LN) > 0 then export to mywm HH1,HH2,LN,MODWM, MODCM, MODTT, MODMN, MODMA, MODST, MODCP, MODFG, MODDV, MODSB, MODHA, MODHH, MODWS, MODHC; endif; Creates – c:\mics\spss\mywm.sps – c:\mics\spss\mywm.dat

8 The Child Export Syntax: if HL8(LN) > 0 then export to mych HH1,HH2,LN,MODUF, MODBR, MODCE, MODVA, MODBF, MODCA, MODML, MODIM, MODAN, HL4(UF4), ED3A(UF6), MODHH, MODWS, MODHC; endif; Creates – c:\mics\spss\mych.sps – c:\mics\spss\mych.dat

9 Exporting a Household Member Household members data stored in rosters Must export correct data from each roster for each household member Loop through household members. For each: – loop through each roster until found household member in that roster – store occurrence number in a variable – export data using occurrence numbers

10 The Household Member Export noline = 999; i = 1; while i <= HH11 do... export to myhl HH1, HH2, MODHL(hlline), MODED(edline), MODOR(ovline), MODCL(clline), MODDA(daline), MODMM(mmline), MODHH, MODWS, MODHC; i = i + 1; enddo;

11 Incrementing Line Numbers while i <= HH11 do hlline = HL1(i); edline = noline; {noline = 999} j = 1; while j <= noccurs(MODHL) do if ED1(j) = hlline then edline = j; j = noccurs(MODHL); endif; j = j + 1; enddo; export...; i = i + 1; enddo;

12 Secondary Data Processing Flow Export Data from CSPRO Import Data into SPSS Recode Variables Add Sample Weights, Wealth Index and GPS Data Run Tables

13 Reading the Data Into SPSS To read one of the exported data files into SPSS: – 1. Start SPSS – 2. Open the syntax file associated with the data file – 3. Execute the syntax file run --> all – 4. Save the file as XX.SAV where XX is HH, HL, WM or CH.

14 Saving the Data File It is helpful to have the syntax file automatically save the data file that it creates To do so, add the following line to the end of the syntax file: save outfile = 'hh.sav'.


Download ppt "MICS Data Processing Workshop Exporting to SPSS. Secondary Data Processing Flow Export Data from CSPRO Import Data into SPSS Recode Variables Add Sample."

Similar presentations


Ads by Google