MICS Data Processing Workshop Tabulation Programs.

19
MICS Data Processing Workshop Tabulation Programs

Transcript of MICS Data Processing Workshop Tabulation Programs.

Page 1: MICS Data Processing Workshop Tabulation Programs.

MICS Data Processing Workshop

Tabulation Programs

Page 2: 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

Page 3: MICS Data Processing Workshop Tabulation Programs.

Tabulation Guidelines

World Summit Indicators– Goal # and Table #

Preliminary report– Recommended tabulations

General tabulation notes– Special exceptions

Caretaker’s education labeled mother’s education

Page 4: MICS Data Processing Workshop Tabulation Programs.

Tabulation Guidelines

Variables used Recommended layout Notes on calculations Suggestions on figures and graphs

Page 5: MICS Data Processing Workshop Tabulation Programs.

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

Page 6: MICS Data Processing Workshop Tabulation Programs.

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

Page 7: MICS Data Processing Workshop Tabulation Programs.

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.

Page 8: MICS Data Processing Workshop Tabulation Programs.

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

Page 9: MICS Data Processing Workshop Tabulation Programs.

What We Want

60.0%West

70.0%South

40.0%East

20.0%North

% Received TT InjectionRegion

Page 10: MICS Data Processing Workshop Tabulation Programs.

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 TT

Received TTRegion

Page 11: MICS Data Processing Workshop Tabulation Programs.

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

Page 12: MICS Data Processing Workshop Tabulation Programs.

The Result

60.0West

70.0South

40.0East

20.0North

% Received TT InjectionRegion

Page 13: MICS Data Processing Workshop Tabulation Programs.

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”

Page 14: MICS Data Processing Workshop Tabulation Programs.

Aggregating Data

aggregate outfile = ‘newfile’

/break = varlist

/newvar1 = sum(oldvar1)

/newvar2 = sum(oldvar2).

Page 15: MICS Data Processing Workshop Tabulation Programs.

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

Page 16: MICS Data Processing Workshop Tabulation Programs.

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)

Page 17: MICS Data Processing Workshop Tabulation Programs.

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)

Page 18: MICS Data Processing Workshop Tabulation Programs.

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

Page 19: MICS Data Processing Workshop Tabulation Programs.

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