The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Nutrition and Anthropometry » Breastfeeding status by age
Breastfeeding status by age [message #9568] Mon, 18 April 2016 15:07 Go to previous message
tony is currently offline  tony
Messages: 10
Registered: March 2013
Location: Ghana
Member

Hello,

I am trying to get the breastfeeding status of children under 2 years. I am using Ghana Demographic and Health Survey 2014. I have tried categorizing all the foods taken by the children as captured by the survey but I am not getting the corresponding figures as in the GDHS report. Thus, Table 11.3: Breastfeeding Status by age. Below are the STATA codes I used. I am using the GHKR70FL file. Any help! Thanking you.

**** To get the last children of 2 yrs living with mom *****
gen age = v008-b3
keep if age<24 & b5==1
recode age(0/1=1 "0-1")(2/3=2 "2-3")(4/5=3 "4-5")(6/8=4 "6-8")(9/11=5 "9-11")(12/17=6 "12-17")(18/23=7 "18-23")(24/59=.), gen(child_age)
tab child_age
gen peso=v005/1000000
tab child_age[iw=peso]
keep if b9==0
drop if _n > 0 & caseid == caseid[_n-1]
tab child_age
tab child_age[iw=peso]

numlabel, add

* NOT BREASTFEEDING AND CURRENTLY BREASTFEEDING - v404
******************************************************






*EXCLUSIVE BREASTFEEDING - m39
******************************
*The number of times the children received anything to eat
///aside from breast milk, including both meals and snacks///
//Children who are being exclusively breastfed are coded 0

tab m39

*Recoding m39 to get exclusively breastfed and not exclusively breastfed
recode m39(0=0 "exclusive")(1/8=1 "not_exclusive"), gen(exclv_breast)
tab exclv_breast

*Adding sample weight
tab exclv_breast [iw=peso]

*crosstab with children (0-23m) - [However the results didn't correspond
//with the report especially the 'Exclusive breastfeeding column. The not
//exclusively breastfed I suppose is for children who took some foods]
tab child_age exclv_breast [w=v005], row nofreq

*GENERATING THE VARIABLE STILL BREASTFEEDING
*Recoding the variable M4=duration of breastfeeding the child in months
*m4:
tab m4

*93 ever breastfed, not currently breastfeeding
*94 never breastfed
*95 Still breastfeeding

****** Generating a new variable "breastfed" for children BF and those not BF *****
gen breastfed=.
replace breastfed=1 if m4!=. & m4<=94
replace breastfed=2 if m4!=. & m4==95
tab breastfed, mis

gen breastfedd=.
replace breastfedd=1 if m4<=94
replace breastfedd=2 if m4==95
tab breastfedd


recode breastfed(1=0 "ever/never breastfed")(2=1 "still breastfeeding"), gen(breastfeding)
numlabel, add
tab breastfeding

**** Further grouping of water and other foods (in order to get a composite table of the 5 categories as stated in Table 11.3) *****

*WATER ONLY - V409
******************
* Finding children who took water only
tab v409
recode v409(0=0)(1=1 "water_yes")(8/9=.), gen(plainwater)
tab plainwater

*Generating new variable for "Breastfeeding and plainwater"
gen bf_plwater=.
replace bf_plwater=1 if breastfeding!=. & breastfeding==0
replace bf_plwater=1 if plainwater!=. & plainwater==0
replace bf_plwater=2 if breastfeding!=. & breastfeding==1
replace bf_plwater=2 if plainwater!=. & plainwater==1
tab bf_plwater
recode bf_plwater (1=0 "not both")(2=1 "took both"), gen(bf_plwter)
numlabel, add
tab bf_plwter
tab child_age bf_plwter, row nofreq

*NON-MILK LIQUIDS
*****************
* Finding children who consumed non-milk liquids
tab v410
recode v410(0=0)(1=1 "juice_yes"), gen(juice)
tab juice

tab v413
recode v413(0=0)(1=1 "otherliq_yes"), gen(other_liq)
tab other_liq

tab v412c
recode v412c(0=0)(1=1 "broth_yes"), gen(clear_broth)
tab clear_broth

******** Generating a single variable for
//Children were breastfeeding and took non-milk liquids *******

gen bf_nomilk=.
replace bf_nomilk=1 if breastfeding!=. & breastfeding==0
replace bf_nomilk=1 if juice!=. & juice==0
replace bf_nomilk=1 if other_liq!=. & other_liq==0
replace bf_nomilk=1 if clear_broth!=. & clear_broth==0
replace bf_nomilk=2 if breastfeding!=. & breastfeding==1
replace bf_nomilk=2 if juice!=. & juice==1
replace bf_nomilk=2 if other_liq!=. & other_liq==1
replace bf_nomilk=2 if clear_broth!=. & clear_broth==1
tab bf_nomilk
recode bf_nomilk (1=0 "not all")(2=1 "took all"), gen(bf_nonmilk)
numlabel, add
tab bf_nonmilk
tab child_age bf_nonmilk, row nofreq

*OTHER MILK
***********
* Finding children who consumed other milk
tab v411
recode v411(0=0)(1=1 "tin_yes"), gen(tin)
tab tin

tab v411a
recode v411a(0=0)(1=1 "formula_yes"), gen(formula)
tab formula

tab v414p
recode v414p(0=0)(1=1 "cheese_yes"), gen(cheese)
tab cheese

tab v414v
recode v414v(0=0)(1=1 "yogurt_yes"), gen(yogurt)
tab yogurt

***** Generating a single variable for
//children who breastfed and consumed other milk *******

gen bf_othermilk=.
replace bf_othermilk=1 if breastfeding!=. & breastfeding==0
replace bf_othermilk=1 if tin!=. & tin==0
replace bf_othermilk=1 if formula!=. & formula==0
replace bf_othermilk=1 if cheese!=. & cheese==0
replace bf_othermilk=1 if yogurt!=. & yogurt==0
replace bf_othermilk=2 if breastfeding!=. & breastfeding==1
replace bf_othermilk=1 if tin!=. & tin==1
replace bf_othermilk=1 if formula!=. & formula==1
replace bf_othermilk=1 if cheese!=. & cheese==1
replace bf_othermilk=1 if yogurt!=. & yogurt==1
tab bf_othermilk
recode bf_othermilk (1=0 "not all")(2=1 "took all"), gen(bf_othrmilk)
numlabel, add
tab bf_othrmilk
tab child_age bf_othrmilk, row nofreq

*COMPLEMENTARY FOODS
********************
*finding children who consumed complementary foods
tab v412a
recode v412a(0=0)(1=1 "cerelac_yes"), gen(cerelac)
tab cerelac

tab v414e
recode v414e(0=0)(1=1 "bread_yes"), gen(bread)
tab bread

tab v414f
recode v414f(0=0)(1=1 "pota_yes"), gen(potatoes)
tab potatoes

tab v414g
recode v414g(0=0)(1=1 "eggs_yes"), gen(eggs)
tab eggs

tab v414h
recode v414h(0=0)(1=1 "meat_yes"), gen(meat)
tab meat

tab v414i
recode v414i(0=0)(1=1 "pump_yes"), gen(pumpkin)
tab pumpkin

tab v414j
recode v414j(0=0)(1=1 "dark_yes"), gen(darkgreen)
tab darkgreen

tab v414k
recode v414k(0=0)(1=1 "mango_yes"), gen(mangoes)
tab mangoes

tab v414l
recode v414l(0=0)(1=1 "fruit_yes"), gen(fruits)
tab fruits

tab v414m
recode v414m(0=0)(1=1 "liver_yes"), gen(liver)
tab liver

tab v414n
recode v414n(0=0)(1=1 "fish_yes"), gen(fish)
tab fish

tab v414o
recode v414o(0=0)(1=1 "beans_yes")(9=.), gen(beans)
tab beans

tab v414s
recode v414s(0=0)(1=1 "solid_yes")(8/9=.), gen(solidfood)
tab solidfood

***** Generating a single variable for children
// breastfeeding and consumed complementary foods ***************

gen bf_comple=.
replace bf_comple=1 if breastfeding!=. & breastfeding==0
replace bf_comple=1 if cerelac!=. & cerelac==0
replace bf_comple=1 if bread!=. & bread==0
replace bf_comple=1 if potatoes!=. & potatoes==0
replace bf_comple=1 if eggs!=. & eggs==0
replace bf_comple=1 if meat!=. & meat==0
replace bf_comple=1 if pumpkin!=. & pumpkin==0
replace bf_comple=1 if darkgreen!=. & darkgreen==0
replace bf_comple=1 if mangoes!=. & mangoes==0
replace bf_comple=2 if fruits!=. & fruits==0
replace bf_comple=1 if liver!=. & liver==0
replace bf_comple=1 if fish!=. & fish==0
replace bf_comple=1 if beans!=. & beans==0
replace bf_comple=1 if solidfood!=. & solidfood==0
replace bf_comple=1 if breastfeding!=. & breastfeding==1
replace bf_comple=1 if cerelac!=. & cerelac==1
replace bf_comple=1 if bread!=. & bread==1
replace bf_comple=1 if potatoes!=. & potatoes==1
replace bf_comple=1 if eggs!=. & eggs==1
replace bf_comple=1 if meat!=. & meat==1
replace bf_comple=1 if pumpkin!=. & pumpkin==1
replace bf_comple=1 if darkgreen!=. & darkgreen==1
replace bf_comple=1 if mangoes!=. & mangoes==1
replace bf_comple=2 if fruits!=. & fruits==1
replace bf_comple=1 if liver!=. & liver==1
replace bf_comple=1 if fish!=. & fish==1
replace bf_comple=1 if beans!=. & beans==1
replace bf_comple=1 if solidfood!=. & solidfood==1
tab bf_comple
recode bf_comple (1=0 "not all")(2=1 "took all"), gen(bf_compl)
numlabel, add
tab bf_compl
tab child_age bf_compl, row nofreq

**** Generating a composite variable for "Breastfeeding Status"
//EBF; BF+Water;BF+Nonmilk; BF+Other milk; BF+Comple

*EBF
tab exclv_breast
*BF
tab breastfeding
*Water
tab bf_plwter
*BF+Nonmilk
tab nonmilk
*BF+Other milk
tab othrmilk
*BF+Comple
tab bf_compl

*Now putting all the categories together to get the 5 breastfeeding status groups
gen bf_stats=.
replace bf_stats=1 if exclv_breast!=. & exclv_breast==0
replace bf_stats=1 if exclv_breast!=. & exclv_breast==1
replace bf_stats=2 if bf_plwter!=. & bf_plwter==0
replace bf_stats=2 if bf_plwter!=. & bf_plwter==1
replace bf_stats=3 if bf_nonmilk!=. & bf_nonmilk==0
replace bf_stats=3 if bf_nonmilk!=. & bf_nonmilk==1
replace bf_stats=4 if bf_othrmilk!=. & bf_othrmilk==0
replace bf_stats=4 if bf_othrmilk!=. & bf_othrmilk==1
replace bf_stats=5 if bf_compl!=. & exclv_breast==0
replace bf_stats=5 if bf_compl!=. & bf_compl==1

*To get the various breastfeeding status of children under 2 years
tab bf_stats
recode bf_stats (1=0 "not all")(2=1 "took all"), gen(bf_status)
numlabel, add
tab bf_status
tab child_age bf_status, row nofreq
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Format of Percentile and SD
Next Topic: DHS Household Weights - Arrondisment Scale
Goto Forum:
  


Current Time: Tue Apr 16 10:10:19 Coordinated Universal Time 2024