* do e:\DHS\Breastfeeding\Ethiopia2016_breastfeeding_do_8Jan2024.txt * Program to construct the IYCF (breastfeeding) indicator in table 11.3 * Youngest child under age 2 living with the mother * Applied to Ethiopia 2016 survey * This is a modification of the approach in the GitHub program * Open the KR file use "C:\Users\26216\ICF\Analysis - Shared Resources\Data\DHSdata\ETKR71FL.DTA" , clear * We want the youngest child under 2 living with the mother egen bidxr=rank(bidx) if b9==0 & b19<24, by(v001 v002 v003) gen breast=0 replace breast=1 if m4==95 * Types of infant and young child feeding * Note that m38 (bottle feeding) is not counted as Other Milk; it goes not contribute * to the construction of diet gen bottle=0 replace bottle=1 if m38==1 * New approach with locals that makes it easier to match the variables to the types local ltypes water liquids milk * Asterisks are not allowed in the following locals * Some of the variables are NA in specific surveys; must review for each survey * Note different classifications of yogurt; yogurt as a drink is milk * No drink counts as milk if it has sugar * For water, liquids, and milk, construct locals with the variable names local lwater v409 local lliquids v410 v412c v413 local lmilk v411 v411a * Note special treatment of v412a, which is classified as a solid foreach lt of local ltypes { gen `lt'=0 if breast<. foreach ll of local l`lt' { replace `lt'=1 if `ll'==1 } } * For solids, construct a local for the letters of v414. Ok to include NA variables * so long as they are actually in the data gen solids=0 if breast<. replace solids=1 if v412a==1 local lsolids e f g h i j k l m n o p s v foreach ll of local lsolids { replace solids=1 if v414`ll'==1 } gen diet=. replace diet=0 if breast==1 & water==0 & liquids==0 & milk==0 & solids==0 replace diet=1 if breast==1 & water==1 & liquids==0 & milk==0 & solids==0 replace diet=2 if breast==1 & liquids==1 & milk==0 & solids==0 replace diet=3 if breast==1 & milk==1 & solids==0 replace diet=4 if breast==1 & milk==0 & solids==1 replace diet=5 if breast==1 & milk==1 & solids==1 replace diet=6 if breast==0 tab diet,m label define diet 0 "Breastfed Only" /// 1 "Breastmilk and Water" /// 2 "Breastmilk and Liquids" /// 3 "Breastmilk and Other Milk" /// 4 "Breastmilk and Solids" /// 5 "Breastmilk, Milk and Solids" /// 6 "Weaned" /// 8 "Don't know" label values diet diet * diet is DK if any component is DK foreach lt of local ltypes { foreach ll of local l`lt' { replace diet=8 if `ll'==8 } } replace diet=8 if v412a==8 foreach ll of local lsolids { replace diet=8 if v414`ll'==8 } * Compare the following with Table 11.3, age 0-5 months tab diet [iw=v005/1000000] if bidxr==1 & b19<6 * Two problems: the weighted n is 15 cases too low for age 0-5 months and * the DK cases should apparently be allocated to Breastfed Only and Weaned