The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Dataset use in SPSS » Calculating cases for IYCF
Re: Calculating cases for IYCF [message #11421 is a reply to message #11411] Mon, 19 December 2016 08:49 Go to previous messageGo to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3203
Registered: February 2013
Senior Member
Following is a response from DHS Senior Research Associate, Shireen Assaf:

Quote:
To match the table for exclusive breastfeeding you would need to compute some variables such as drank any liquids or consuming any solids, etc. The code below can be used to match the table for exclusive breastfeeding. The estimate is 71.4% for children 0-5 months and the denominator is 1,698.



** Exclusive breast feeding
use MWKR61FL.dta, clear

gen age=v008-b3

keep if b9==0

* finding the youngest child living with the mother for each mother
bysort v001 v002 v003: egen minbidx=min(bidx) 
* keep only children less than 2 years 
keep if age<24
* need to drop those that are bidx==2 and minbidx==1
drop if bidx>minbidx

gen water=0
gen liquids=0
gen milk=0
gen solids=0
gen breast=0
gen bottle=0

*TO DETERMINE IF CHILD IS GIVEN WATER, SUGAR WATER, JUICE, TEA OR OTHER.
replace water=1 if (v409>=1 & v409<=7)
                                                                   
* IF GIVEN OTHER LIQUIDS
foreach xvar of varlist v409a v410 v410*  v413* {
replace liquids=1 if `xvar'>=1 & `xvar'<=7
}

cap replace liquids=1 if v412c>=1 & v412c<=7
                                                                                                
* IF GIVEN POWDER/TINNED milk, FORMULA OR FRESH milk
foreach xvar of varlist v411 v411a v412 v414p {
replace milk=1 if `xvar'>=1 & `xvar'<=7
}

* IF STILL BREASTFEEDING
replace breast=1 if m4==95 

* IF WAS EVER BOTTLE FED
replace bottle=1 if m38==1 

*IF GIVEN ANY SOLID FOOD
foreach xvar of varlist v414* {
replace solids=1 if `xvar'>=1 & `xvar'<=7
}
replace solids=1 if v412a==1 | v412b==1 
                
gen diet=7
replace diet=0 if water==0 & liquids==0 & milk==0 & solids==0
replace diet=1 if water==1 & liquids==0 & milk==0 & solids==0
replace diet=2 if            liquids==1 & milk==0 & solids==0 
replace diet=3 if                         milk==1 & solids==0 
replace diet=4 if                         milk==0 & solids==1 
replace diet=5 if                         milk==1 & solids==1 
replace diet=6 if breast==0 

*diet=0: given only water (full bf)
*diet=1: given only liquids (bf & liquids)
*diet=2: given only milks (bf & milk)
*diet=3: given only solids (bf & solids)
*diet=4: given only milk and solids (bf & milk & solids)
*diet=5: not still breastfeeding (weaned)
*diet=6: not now being breastfed (m4~=95)

** Matching Table 11.3 for exclusive breast feeding in 0-5 month children **      
gen ebf=0 
replace ebf=1 if diet==0 
ta ebf if age<6 [iw=v005/1000000]


 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Selecting one child per mother
Next Topic: Postnatal care utilization variable in 2015-2016 MDHS dataset
Goto Forum:
  


Current Time: Sun Dec 8 01:40:27 Coordinated Universal Time 2024