Exporting to SPSS

Download Report

Transcript Exporting to SPSS

Multiple Indicator Cluster Surveys

Data Processing Workshop Exporting to SPSS MICS4 Data Processing Workshop

Secondary Data Processing Flow

Export Data from CSPro Import Data into SPSS Recode Variables Add Sample Weights, Wealth Index, and GPS Data Run Tables MICS4 Data Processing Workshop

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

MICS4 Data Processing Workshop

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

MICS4 Data Processing Workshop

The Export Application

• A batch application – uses export to command • Creates SPSS data and description files for eight types of cases: – Household (HH) – Household member (HL) – Insecticide-treated Nets (TN) – Woman (WM) – Female Genital Cutting (FG) – Birth History (BH) – Under-five (CH) – Man (MN)

MICS4 Data Processing Workshop

The Household (HH) Export

• Syntax: export to myHH HH1, HH2, { ID vars } MODHH, MODWS, MODHC, MODIR, MODCD, MODHW, MODSI,

HHSex

; • Creates – c:\mics4\spss\myHH.sps

– c:\mics4\spss\myHH.dat

MICS4 Data Processing Workshop

The Household (HH) Export

HHSex

: recoded variable that was created using information from the Household Listing: HHSex = notappl; if HH9 = 1 then HHSex = HL4(1); endif;

MICS4 Data Processing Workshop

Exporting a Household Member

• Household members data stored in rosters • Must export correct data from each roster for each household member • For each: – export data using occurrence numbers

MICS4 Data Processing Workshop

The Household Member (HL) Export

export to myHL HH1, HH2, MODHL(hloccur), MODED(edoccur), MODCL(cloccur), MODTN(tnoccur), HH5D, HH5M, HH5Y, HH6, HH7,

mline, fline;

MICS4 Data Processing Workshop

The Insecticide Nets (TN) Export

• Syntax: for i in MODTN_EDT do export to myTN HH1, HH2, { ID vars } MODTN (i), TN2, HH6, HH7; enddo; • Creates – c:\mics4\spss\myTN.sps

– c:\mics4\spss\myTN.dat

MICS4 Data Processing Workshop

The Woman (WM) Export

• Syntax: if HL7(LN) > 0 export to myWM then HH1, HH2, LN, { ID vars } MODWM, MODWB, MODCM, MODDB, MODMN, MODIS, MODCP, MODUN, MODFG, MODDV, MODMA, MODSB, MODHA, MODTN(tnoccur), HH6, HH7,

wdoi, wdob, wage, wdom, wagem, wdobfc, wdoblc, mstatus, ceb, csurv, cdead; { Recoded variables }

endif; • Creates – c:\mics4\spss\myWM.sps

– c:\mics4\spss\myWM.dat

MICS4 Data Processing Workshop

The Female Genital Cutting(FG) Export • Syntax: for i in MODFC_EDT do export to myFC HH1, HH2, LN, { ID vars } MODFC(i),

wdoi, wdob; { Recoded variables }

enddo; endif; • Creates – c:\mics4\spss\myFC.sps

– c:\mics4\spss\myFC.dat

MICS4 Data Processing Workshop

The Birth History (BH) Export

• Syntax: for i in MODBH_EDT do export to myBH HH1, HH2, LN, { ID vars } MODBH(i),

wdoi, wdob; { Recoded variables }

enddo; • Creates – c:\mics4\spss\myBH.sps

– c:\mics4\spss\myBH.dat

MICS4 Data Processing Workshop

The Child (CH) Export

• Syntax: if HL9(LN) > 0 then export to myCH HH1, HH2, LN, { ID vars } MODUF, MODAG, MODBR, MODEC, MODBF, MODCA,MODML, MODIM, MODAN,

Anthro_Vars,

MODTN(tnoccur), HH6, HH7, HL4(UF4), ED4A(UF6),ED4B(UF6),

cdoi, cdob, cage, cage_6, cage_11, caged;

endif ; • Creates – c:\mics4\spss\myCH.sps

– c:\mics4\spss\myCH.dat

MICS4 Data Processing Workshop

The Man (MM) Export

• Syntax: if HL7A(LN) > 0 then export to myMM HH1, HH2, LN, { ID vars } MODMM, MODMB, MODMCM, MODMCP, MODMUN, MODMMA, MODMSB, MODMHA, MODTN(tnoccur), HH6, HH7,

mdoi, mdob, mage, mdom, magem, mdobfc, mdoblc, mmstatus, mceb, mcsurv, mcdead; { Recoded variables }

endif; • Creates – c:\mics4\spss\myMN.sps

– c:\mics4\spss\myMN.dat

MICS4 Data Processing Workshop

Secondary Data Processing Flow

Export Data from CSPro Import Data into SPSS Recode Variables Add Sample Weights, Wealth Index and GPS Data Run Tables MICS4 Data Processing Workshop

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, TN, WM, FC, BH, CH or MN

MICS4 Data Processing Workshop

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'.

MICS4 Data Processing Workshop