Home » Topics » Nutrition and Anthropometry » Minimum acceptable diet
Re: Minimum acceptable diet [message #29865 is a reply to message #29851] |
Wed, 14 August 2024 16:25 |
geoK
Messages: 56 Registered: May 2014
|
Senior Member |
|
|
Thank you for the response.
I set the data using all the conditions mentioned, but the numbers still don't match.
Here is the Stata code I used:
egen sequence=seq() if b9==0 & b19>=6 & b19<=23 & m55<., by(v001 v002 v003)
gen in_sample=1 if sequence==1
tab in_sample [iweight=v005/1000000]
keep if in_sample==1
gen nt_formula= v411a==1
label values nt_formula yesno
label var nt_formula "Child given infant formula in day/night before survey - last-born under 2 years"
gen nt_milk= v411==1
label values nt_milk yesno
label var nt_milk "Child given other milk in day/night before survey- last-born under 2 years"
gen nt_liquids= v410==1 | v410a==1 |v410as==1 | v412c==1 | v413==1| v413s==1|v413a==1| v413as==1| v413b==1| v413bs==1|v413c==1| v413d ==1
label values nt_liquids yesno
label var nt_liquids "Child given other liquids in day/night before survey- last-born under 2 years"
gen nt_bbyfood= v412a==1
label values nt_bbyfood yesno
label var nt_bbyfood "Child given fortified baby food in day/night before survey- last-born under 2 years"
gen nt_grains= v412a==1 | v414e==1
label values nt_grains yesno
label var nt_grains "Child given grains in day/night before survey- last-born under 2 years"
gen nt_vita= v414i==1 | v414j==1 | v414k==1
label values nt_vita yesno
label var nt_vita "Child given vitamin A rich food in day/night before survey- last-born under 2 years"
gen nt_frtveg= v414a == 1 |v414l==1|v414wa==1
label values nt_frtveg yesno
label var nt_frtveg "Child given other fruits or vegetables in day/night before survey- last-born under 2 years"
gen nt_root= v414f==1
label values nt_root yesno
label var nt_root "Child given roots or tubers in day/night before survey- last-born under 2 years"
gen nt_nuts= v414c==1 |v414o==1
label values nt_nuts yesno
label var nt_nuts "Child given legumes or nuts in day/night before survey- last-born under 2 years"
gen nt_meatfish= v414h==1 | v414m==1 | v414n==1
replace nt_meatfish= 1 if v414b==1
replace nt_meatfish= 1 if v414d==1
label values nt_meatfish yesno
label var nt_meatfish "Child given meat, fish, shellfish, or poultry in day/night before survey- last-born under 2 years"
gen nt_eggs= v414g==1
label values nt_eggs yesno
label var nt_eggs "Child given eggs in day/night before survey- last-born under 2 years"
gen nt_dairy= v414p==1 | v414v==1
label values nt_dairy yesno
label var nt_dairy "Child given cheese, yogurt, or other milk products in day/night before survey- last-born under 2 years"
gen nt_solids= nt_bbyfood==1 | nt_grains==1 | nt_vita==1 | nt_frtveg==1 | nt_root==1 | nt_nuts==1 | nt_meatfish==1 | nt_eggs==1 | nt_dairy==1 | v414s==1| v414t==1| v414r==1
label values nt_solids yesno
label var nt_solids "Child given any solid or semisolid food in day/night before survey- last-born under 2 years"
gen totmilkf = 0
replace totmilkf=totmilkf + v469e if v469e<8
replace totmilkf=totmilkf + v469f if v469f<8
replace totmilkf=totmilkf + v469x if v469x<8
gen nt_fed_milk= ( totmilkf>=2 | m4==95) if inrange(b19,6,23)
label values nt_fed_milk yesno
label var nt_fed_milk "Child given milk or milk products- last-born 6-23 months"
gen group1= m4==95
gen group2= nt_formula==1 | nt_milk==1 | nt_dairy==1
gen group3= nt_grains==1 | nt_root==1 | nt_bbyfood==1
gen group4= nt_vita==1
gen group5= nt_frtveg==1
gen group6= nt_eggs==1
gen group7= nt_meatfish==1
gen group8= nt_nuts==1
egen foodsum = rsum(group1 group2 group3 group4 group5 group6 group7 group8)
recode foodsum (1/4 .=0 "No") (5/8=1 "Yes"), gen(nt_mdd)
replace nt_mdd=. if b19<6
label values nt_mdd yesno
label var nt_mdd "Child with minimum dietary diversity, 5 out of 8 food groups- last-born 6-23 months"
gen feedings=totmilkf
replace feedings= feedings + m39 if m39>0 & m39<8
gen nt_mmf = (m4==95 & inrange(m39,2,7) & inrange(b19,6,8)) | (m4==95 & inrange(m39,3,7) & inrange(b19,9,23)) | (m4!=95 & feedings>=4 & inrange(b19,6,23))
replace nt_mmf=. if b19<6
label values nt_mmf yesno
label var nt_mmf "Child with minimum meal frequency- last-born 6-23 months"
egen foodsum2 = rsum(nt_grains nt_root nt_nuts nt_meatfish nt_vita nt_frtveg nt_eggs)
gen nt_mad = (m4==95 & nt_mdd==1 & nt_mmf==1) | (m4!=95 & foodsum2>=4 & nt_mmf==1 & totmilkf>=2)
replace nt_mad=. if b19<6
label values nt_mad yesno
label var nt_mad "Child with minimum acceptable diet- last-born 6-23 months"
tab nt_mad
gen wt=v005/1000000
svyset [pw=wt], psu( v021 ) singleunit(centered) strata (v022)
gen childage6to23=0
replace childage6to23=1 if inrange(b19, 6,23)
svy, subpop (childage6to23): tab nt_mad, obs per
|
|
|
Goto Forum:
Current Time: Fri Nov 22 16:25:11 Coordinated Universal Time 2024
|