190 likes | 338 Views
MICS Data Processing Workshop. Tabulation Programs. Secondary Data Processing Flow. Export Data from CSPRO. Import Data into SPSS. Recode Variables. Add Sample Weights, Wealth Index and GPS Data. Run Tables. Tabulation Guidelines. World Summit Indicators Goal # and Table #
E N D
MICS Data Processing Workshop Tabulation Programs
Secondary Data Processing Flow Export Data from CSPRO Import Data into SPSS Recode Variables Add Sample Weights, Wealth Index and GPS Data Run Tables
Tabulation Guidelines • World Summit Indicators • Goal # and Table # • Preliminary report • Recommended tabulations • General tabulation notes • Special exceptions • Caretaker’s education labeled mother’s education
Tabulation Guidelines • Variables used • Recommended layout • Notes on calculations • Suggestions on figures and graphs
Tabulation Programs • One program for each tabulation • Tables named T##.SPS • Check each table program carefully • If missing variables, may have to remove table • Add programs for tables based on country specific variables
INCLUDE Command • All tables can be executed from TABLES.SPS • TABLES.SPS uses the INCLUDE command • Any error stops execution • All tables programs have to follow certain rules • Commands begin in 1st column • Use + to denote indentation • Subcommands can’t begin in 1st column
Indentation and the INCLUDE Command do if (misshw = 0). + recode WAZ (lo thru -2.00 = 1) (else = 0) into wa2. + recode WAZ (lo thru -3.00 = 1) (else = 0) into wa3. + recode HAZ (lo thru -2.00 = 1) (else = 0) into ha2. + recode HAZ (lo thru -3.00 = 1) (else = 0) into ha3. + recode WHZ (lo thru -2.00 = 1) (else = 0) into wh2. + recode WHZ (lo thru -3.00 = 1) (else = 0) into wh3. end if.
Calculating Percents • Interested in • percent of women who received TT injection • Want to present only one column • SPSS presents yes and no column • Solve problem by calculating means of a binary variable
Region % Received TT Injection North 20.0% East 40.0% South 70.0% West 60.0% What We Want
Region Received TT Did not receive TT North 20.0% 80.0% East 40.0% 60.0% South 70.0% 30.0% West 60.0% 40.0% What We Get
The Solution • Can calculate percents using means • Recode received TT injection • 1 (Yes) = 100 • 2 (No) = 0 • North has 10 women • 2 Yes, 8 No • Mean = 200/10 = 20
Region % Received TT Injection North 20.0 East 40.0 South 70.0 West 60.0 The Result
TABLES Command tables /ftotal tot_name “Total label” /observations var_list /table = row_vars by col_vars /statistics stat_type(var_name (format) ‘Label’) /title “Title”
Aggregating Data aggregate outfile = ‘newfile’ /break = varlist /newvar1 = sum(oldvar1) /newvar2 = sum(oldvar2).
Aggregating Data • In table 1, we require aggregate data • Values for urban/rural • Values for total • Households • Sampled, occupied and completed • Women • Eligible and interviewed • Children • Eligible and interviewed
Table 20 – Weight at Birth • Weight by woman’s weight • Select children born in the last year • Calculate • Number of live births that were weighed • Number of (weighed) live births < 2500g • Number of births • Save in a data file (tmp.sav) organized by MN4 (size at birth)
Table 20 – Weight at Birth • Open file (tmp.sav) and calculate • Proportion of weighed births < 2500g • Estimate number of births < 2500g • Tabulate this information as a working table • Sort by MN4 (size at birth) • Save MN4 and est. proportion < 2500g in a file (tmp.sav)
Table 20 – Weight at Birth • Open women’s file • Select children born in the last year • Sort cases by MN4 • Merge with tmp.sav • Tabulate est. proportion < 2500g
Table 20 – Weight at Birth • Calculate variables • Percent weighed at birth • Number of live births • Weight data by woman’s weight • Tabulate % weighed and number of births • Background variables • Area • Region • Education of mother