The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Dataset use in SPSS » Vaccinations
Re: Vaccinations [message #2608 is a reply to message #2602] Tue, 22 July 2014 13:56 Go to previous messageGo to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3167
Registered: February 2013
Senior Member
Thanks for letting us know that you figred it out. However, I am posting the syntax provided by our Senior Data Processing Specialist, Ladys Ortiz. Another data user might find it helpful:

*// Number of children.
*// Only for living children age 12-23 months .
COMPUTE months = V008 - B3.
SELECT IF (B5 = 1 & Months >= 12 & Months <= 23).


*// Type of vaccines.
*// BCG.
IF (H2 >= 1 & H2 <= 3) BCG = 1.

* DPT 1.
*// Initializing working variable to accumulate DPT 1,2,3.
COMPUTE DPT = 0.
IF (H3 >= 1 & H3 <= 3) DPT = DPT + 1.
IF (H5 >= 1 & H5 <= 3) DPT = DPT + 1.
IF (H7 >= 1 & H7 <= 3) DPT = DPT + 1.
IF ( DPT >= 1) DPT1 = 1.
IF ( DPT >= 2) DPT2 = 1.
IF ( DPT >= 3) DPT3 = 1.

* POLIO 0.
IF (H0 >= 1 & H0 <= 3) Polio0 = 1.

* POLIO 1.
*// Initializing working variable to accumulate Polio 1,2,3.
COMPUTE Polio = 0.
IF (H4 >= 1 & H4 <= 3) Polio = Polio + 1.
IF (H6 >= 1 & H6 <= 3) Polio = Polio + 1.
IF (H8 >= 1 & H8 <= 3) Polio = Polio + 1.
*// Defining each POLIO variables depending of accumulative number .
IF (Polio >= 1) Polio1 = 1.
IF (Polio >= 2) Polio2 = 1.
IF (Polio >= 3) Polio3 = 1.

* Measles.
IF (H9 >= 1 & H9 <= 3) Measles = 1.

*// Count all basics vaccinations received at any time.
COUNT AllBasic = BCG DPT1 DPT2 DPT3 Polio1 Polio2 Polio3 measles (1).
IF ( Allbasic = 8) AllVac = 1.
VARIABLE LABELS AllVac "".
VALUE LABELS AllVac 1"All basic vaccinations2".

*// Count No basics vaccinations given at any time.
*// No vaccines = none of the basic vaccines & no polio 0.
COMPUTE vP0 = 0.
IF (H0 >= 1 & H0 <= 3) vP0 = 1.
IF ( AllBasic = 0 & vP0 = 0) NoVac = 1.
VARIABLE LABELS NoVac "".
VALUE LABELS NoVac 1"No vaccinations".

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Using a sub-sample for analysis
Next Topic: What does it means M2A$1 - DHS Women's dataset
Goto Forum:
  


Current Time: Sun Oct 6 06:28:45 Coordinated Universal Time 2024