The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Countries » Nepal » Breastfeeding
Re: Breastfeeding [message #13231 is a reply to message #13215] Sat, 07 October 2017 15:47
 Sajhama Messages: 20Registered: July 2017 Member
Thank you very much. This equation helped me solve my problem.

However, I am now struggling with another equation; exclusive breastfeeding and breastfeeding along with drinking or having other things like water, etc. My result differ by few percentages when I followed the below codes. Therefore, I think I must be going wrong somewhere.

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.

Sajama
• Attachment: Output1.spv

 Breastfeeding By: Sajhama on Thu, 05 October 2017 14:47 Re: Breastfeeding By: Trevor-DHS on Thu, 05 October 2017 16:57 Re: Breastfeeding By: Sajhama on Sat, 07 October 2017 15:47 Re: Breastfeeding By: Sajhama on Sun, 08 October 2017 17:46 Re: Breastfeeding By: Liz-DHS on Wed, 31 January 2018 16:39 Re: Breastfeeding By: Sajhama on Fri, 02 February 2018 09:47 Re: Breastfeeding By: Trevor-DHS on Fri, 02 February 2018 10:28 Re: Breastfeeding By: Sajhama on Fri, 02 February 2018 10:52 Re: Breastfeeding By: Sajhama on Tue, 06 February 2018 01:18 Re: Breastfeeding By: Trevor-DHS on Tue, 06 February 2018 11:40 Re: Breastfeeding By: Sajhama on Tue, 06 February 2018 22:15 Re: Breastfeeding By: Liz-DHS on Mon, 27 August 2018 12:23
 Previous Topic: DHS Nepal 2016 Do files Next Topic: pregnancy interval in months variable
Goto Forum:

Current Time: Thu Sep 24 10:18:00 Eastern Daylight Time 2020