The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Nutrition and Anthropometry » Infant and young child feeding
Infant and young child feeding [message #11085] Tue, 25 October 2016 17:12
Woodson is currently offline  Woodson
Messages: 1
Registered: October 2016
Location: Tucson
Member
I am working with the Liberia DHS data from 2007 and wanted to recreate the data outputs found on Table 11.6 in the report; however, I have had some difficulty recreating the output for all children 6-23 months, who have consumed 3+ or 4+ food groups (for breastfed and non-breastfed). I am not sure if I have the correct syntax for the food groups or if there is something else I overlooked.

Thank you for your help.


Here is my syntax:


use "$DHS\LBKR51FL.dta", clear
* Children's recode


* Last child in the last 2 years living with mother
* age in months
gen age = V008-B3
* drop if too old or not alive
keep if age<24 & B5==1
* recode age into groups
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 of all living children born in the last 2 years
tab child_age
svy: tab child_age

* keep only those children living with mother ...
keep if B9==0
* ... and keep the last born of those
drop if _n > 0 & CASEID == CASEID[_n-1]
* check the deonimnator
tab child_age
svy: tab child_age if age>5
tab child_age [iweight=V005/1000000]
tab V024 if age>5 [iweight=V005/1000000]

drop if age<6

foreach var of varlist V414A-V414T V412B V411 V411A {
replace `var'=. if `var'==8 | `var'==9
}

gen grain=0
replace grain=1 if V414E==1 | V414F==1 | V412B==1

gen dairy=0
replace dairy=1 if V414P==1 | V411==1 | V411A==1

gen meat=0
replace meat=1 if V414H==1 | V414M==1 | V414N==1

gen legume=0
replace legume=1 if V414O==1

gen eggs=0
replace eggs=1 if V414G==1

gen veg_vitA=0
replace veg_vitA=1 if V414K==1 | V414J==1 | V414T==1 | V414I==1

gen fats=0
replace fats=1 if V414Q==1

gen veg_other=0
replace veg_other=1 if V414L==1


egen num_food=rowtotal(grain dairy meat legume eggs veg_vitA veg_other fats)
tab num_food

gen food_group4=0
replace food_group4=1 if num_food>=4

gen food_group3=0
replace food_group3=1 if num_food>=3

gen bf_group3=0
replace bf_group3=1 if food_group3==1 & breastfed==1

gen nonbf_group4=0
replace nonbf_group4=1 if food_group4==1 & breastfed==0

gen all_group3_4=0
replace all_group3_4=1 if nonbf_group4==1 | bf_group3==1

label variable all_group3_4 "Among all children 6-23 months fed 3+ or 4+ food groups"

tab all_group3_4

*Per region
svy: tab all_group3_4 if V024==1
svy: tab all_group3_4 if V024==2




Previous Topic: Calculations
Next Topic: Weight and Height for Zimbabwean Women
Goto Forum:
  


Current Time: Fri Dec 27 10:53:50 Coordinated Universal Time 2024