The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Child Health » Child Vaccination_Ethiopia (2016 Ethiopian Demographic and Health Survey)
Re: Child Vaccination_Ethiopia [message #16193 is a reply to message #16191] Tue, 20 November 2018 03:45 Go to previous message
Mlue
Messages: 92
Registered: February 2017
Location: North West
Senior Member
Hello,

Try this one. SPSS

*****************************************

*// [ OPEN THE DATA - PERSON RECODE ] **.
** ETHIOPIA 2016 DHS **.
** **.
GET
  FILE='C:\Users\...\ETBR70FL.SAV'.
DATASET NAME DataSet1 WINDOW=FRONT.

************************************************************************************************************************************.

** WEIGHT VARIABLE.
COMPUTE weight = v005/1000000.

WEIGHT BY weight.

** COMPLEX SURVEY VARIABLES.
COMPUTE psu = v021.
COMPUTE strata = v023.

************************************************************************************************************************************.

RENAME VARIABLES (v013=age) (v106=education) (v025=residence) (v024 = region) (v190=wealth).

************************************************************************************************************************************.

** CHILD AGE IN MONTHS (12-23 months old).
COMPUTE months = b19.
SELECT IF b5 EQ 1 AND (months GE 12 AND months LE 23).

RECODE months (12 THRU 13 = 1) (14 THRU 15 = 2) (16 THRU 17 = 3) 
(18 THRU 19 = 4) (20 THRU 21 = 5) (22 THRU 23 = 6) INTO child_age.
VARIABLE LABELS child_age 'Child age (months)'.
EXECUTE.
VALUE LABELS child_age 1 "12-13 months" 2 "14-15 months" 3 "16-17 months" 4 "18-19 months" 5 "20-21 months" 6 "22-23 months".

************************************************************************************************************************************.

** RECODE VACCINATION VARIABLES.
COMPUTE BCG = RANGE(h2,1,3).
EXECUTE.

COMPUTE Polio0 = RANGE(h0,1,3).
EXECUTE.

COMPUTE DPT = RANGE(h3,1,3)+RANGE(h5,1,3)+RANGE(h7,1,3).
EXECUTE.

COMPUTE Polio = RANGE(h4,1,3)+RANGE(h6,1,3)+RANGE(h8,1,3).
EXECUTE.

*COMPUTE pv = RANGE(pv1,1,3)+RANGE(pv2,1,3)+RANGE(pv3,1,3).
*EXECUTE.

COMPUTE ms = RANGE(h9,1,3).
EXECUTE.

*********************************************************************************.

** DEPENDENT VARIABLE.
COMPUTE vaccination = (BCG=1 & Polio=3 & DPT=3 & ms=1) .
VARIABLE LABELS vaccination 'Received all basic vaccinations'.
EXECUTE.
VALUE LABELS vaccination 0"No" 1"Yes".

*********************************************************************************.

* MOTHER'S AGE AT BIRTH.
COMPUTE agebirth = (b3-v011)/12.
EXECUTE.

RECODE agebirth (LO THRU 19.91667 = 1) (20 THRU 34.91667 = 2) (35 THRU HI = 3) INTO age_at_birth.
VARIABLE LABELS age_at_birth "Mother's age at birth".
EXECUTE.
VALUE LABELS age_at_birth 1 "<20" 2 "20-34" 3 "35-49".

* BIRTH ORDER.
COMPUTE birth_order1 = bord.
   IF (b0 EQ 2) birth_order1 = bord - 1.
   IF (b0 EQ 3) birth_order1 = bord - 2.
EXECUTE.

RECODE birth_order1 (1 = 1) (2 THRU 3 = 2) (4 THRU 5 = 3) (6 THRU HI = 4)  INTO birth_order.
VARIABLE LABELS birth_order "Birth order".
EXECUTE.
VALUE LABELS birth_order 1 "1" 2 "2-3" 3 "4-5" 4 "6+".

*==============================================================================*

** CHECK **.
FREQUENCIES VARIABLES=B4 birth_order residence region education wealth age_at_birth
  /ORDER=ANALYSIS.

CROSSTABS
  /TABLES=B4 birth_order residence region education wealth age_at_birth BY vaccination
  /FORMAT=AVALUE TABLES
  /CELLS=ROW
  /COUNT ROUND CELL.
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: diarrhea with blood
Next Topic: Immunization [Vaccination in First Year of Life]
Goto Forum:
  


Current Time: Sun Dec 22 12:49:35 Coordinated Universal Time 2024