 The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Nutrition and Anthropometry » Calculation of exclusive breastfeeding
Calculation of exclusive breastfeeding Sat, 08 July 2017 03:41  Kdede Messages: 1Registered: June 2017 Location: Tanzania Member  Dear DHS forum members,

can any one help me? am struggling to calculate the EBF using Tanzania Demographic and Health Survey data of 2015/2016 using SPSS. I used the following syntax, but the results are not the same as what has been obtained in Table 11.3 of the TDHS 2015/16 report. where did I go wrong?

Open file.
GET FILE "C:\Users\Samy\Desktop\Dar es Salaam 2017\TZKR7HFL.SAV".

* compute age in months.
COMPUTE age=V008 - B3.
EXECUTE.

* Select children living with the mother.
FILTER OFF.
USE ALL.
SELECT IF (B9=0).
EXECUTE.

AGGREGATE
/BREAK=V001 V002 V003
/BIDX_min=MIN(BIDX).

SELECT IF (BIDX_min = BIDX) .
EXECUTE.

* Select children age below 24.
FILTER OFF.
USE ALL.
SELECT IF ( age < 24).
EXECUTE.

* Create age gropus.
RECODE age (0 thru 1=1) (2 thru 3=2) (4 thru 5=3) (6 thru 8=4) (9 thru 11=5) (12 thru 17=6) (18
thru 23=7) INTO age_grp.
VARIABLE LABELS age_grp 'age group'.
EXECUTE.

VALUE LABELS age_grp 1 " 0-1 month" 2 "2-3 months" 3 "4-5 months" 4 "6-8 months" 5 "9-11 months" 6 "12-17 months" 7 "18-23 months".

*23-06-2017.
COMPUTE water = 0.
EXECUTE.

COMPUTE liquids = 0.
EXECUTE.

COMPUTE milk= 0.
EXECUTE.

COMPUTE solid= 0.
EXECUTE.

COMPUTE bottle= 0.
EXECUTE.
COMPUTE breast= 0.
EXECUTE.

* to determine if child is given water.

DO IF (V409 >= 1 & V409 <= 7).
RECODE water (0=1).
END IF.
EXECUTE.

*To determine if Child is given liquids.
DO IF ((V410 >= 1 & V410 <= 7) | (V412c >= 1 & V412c <= 7) | (V413 >= 1 & V413 <= 7)) .
RECODE liquids (0=1).
END IF.
EXECUTE.

* to determine if child is given milk.

DO IF ((V411 >= 1 & V411 <= 7) | (V411a >= 1 & V411a <= 7)).
RECODE milk (0=1).
END IF.
EXECUTE.

*To determine if child drank from bottle with nipple.

DO IF (M38= 1 ).
RECODE bottle (0=1).
END IF.
EXECUTE.

*To determine if Child is given Solid.

DO IF ((V412A >=1 & V412A<=7) | (V414E >= 1 & V414E <= 7) | (V414F >=1 & V414F <=7) | (V414G >=1 & V414G <=7) | (V414H >=1 & V414H <=7) |
(V414I >=1 & V414I <=7) | (V414J >=1 & V414J <=7) | (V414K >=1 & V414K <=7) | (V414L >=1 & V414L<=7) | (V414M>=1 & V414M<=7) |
(V414N >=1 & V414N <=7) | (V414O >=1 & V414O <=7) | (V414P >=1 & V414P <=7) | (V414S >=1 & V414S <=7) | (V414V >=1 & V414V <=7)).
RECODE Solid (0=1).
END IF.
EXECUTE.

*To determine if child is still breastfeeding.

DO IF (M4= 95).
RECODE breast (0=1).
END IF.
EXECUTE.
VALUE LABELS breast 0 "Not breastfeeding" 1 " Still breastfeeding".

*Matching Table 11.3 for exclusive breast feeding in 0-5 month children.

COMPUTE feeding=7.
EXECUTE.

* exclusive breastfeeding.
DO IF (water = 0 & liquids = 0 & Milk = 0 & Solid = 0).
RECODE feeding (7=1).
END IF.
EXECUTE.

* Breastfeeding + water.
DO IF (water = 1 & liquids = 0 & Milk = 0 & Solid = 0).
RECODE feeding (7=2).
END IF.
EXECUTE.

* Breastfeeding + liquids.
DO IF ( liquids = 1 & milk = 0 & solid = 0).
RECODE feeding (7=3).
END IF.
EXECUTE.

* Breastfeeding + milk.
DO IF (milk = 1 & solid = 0).
RECODE feeding (7=4).
END IF.
EXECUTE.

* Breastfeeding + solid.
DO IF (solid = 1).
RECODE feeding (7=5).
END IF.
EXECUTE.

* Not breastfeeding.
DO IF (breast= 0).
RECODE feeding (7=0).
END IF.
EXECUTE.

VALUE LABELS feeding 0 "Not breastfeeding" 1 "exclusive breastfeeding" 2 "+Water" 3 "+Liquids" 4 "+Other Milk" 5 "+Solids".

COMPUTE wt=v005/1000000.
EXECUTE.

*exclusive breastfeeding age < 6 months.
COMPUTE ebf=0.
EXECUTE.

DO IF (feeding = 1).
RECODE ebf (0=1).
END IF.
EXECUTE.

USE ALL.
COMPUTE filter_\$=(age < 6).
VARIABLE LABELS filter_\$ 'age < 6 (FILTER)'.
VALUE LABELS filter_\$ 0 'Not Selected' 1 'Selected'.
FORMATS filter_\$ (f1.0).
FILTER BY filter_\$.
EXECUTE.

FREQUENCIES VARIABLES=ebf
/ORDER=ANALYSIS.

Dede
PhD student-ISS Netherlands
• Attachment: Dede Syntax Dar 2017.sps

K.S.Dede
Re: Calculation of exclusive breastfeeding [message #13176 is a reply to message #12750] Sun, 01 October 2017 01:27 Liz-DHS Messages: 1516Registered: February 2013 Senior Member
Dear User,
Do you still need assistance with this post? If you do, you may want to search the forum for keywords "exclusive breastfeeding". You may find something to troubleshoot your code there. If you still need assistance reviewing related posts, please feel free to let us know and post again.
Thank you!

[Updated on: Sun, 01 October 2017 01:31]

Report message to a moderator

 Previous Topic: Children dataset sample size does not match with DHS Nigeria report (2008 and 2013) Next Topic: Z-score
Goto Forum:

Current Time: Sun May 28 13:24:43 Coordinated Universal Time 2023