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 1 st column Use + to denote indentation – Subcommands can’t begin in 1 st column
Indentation and the INCLUDE Command do if (misshw = 0). + recode WAZ (lo thru = 1) (else = 0) into wa2. + recode WAZ (lo thru = 1) (else = 0) into wa3. + recode HAZ (lo thru = 1) (else = 0) into ha2. + recode HAZ (lo thru = 1) (else = 0) into ha3. + recode WHZ (lo thru = 1) (else = 0) into wh2. + recode WHZ (lo thru = 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
What We Want 60.0%West 70.0%South 40.0%East 20.0%North % Received TT InjectionRegion
What We Get 40.0%60.0%West 30.0%70.0%South 60.0%40.0%East 80.0%20.0%North Did not receive TTReceived TTRegion
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
The Result 60.0West 70.0South 40.0East 20.0North % Received TT InjectionRegion
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