The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Topics » Nutrition and Anthropometry » calculation of exclusive breastfeeding
Re: calculation of exclusive breastfeeding [message #8221 is a reply to message #2972] Thu, 17 September 2015 10:09 Go to previous messageGo to previous message
danafer is currently offline  danafer
Messages: 1
Registered: March 2013
Location: Boston, MA
Member
Here is the Stata code that I used to identify kids in the subpopulation for exclusive breastfeeding (for 0-5 months) and calculate exclusive breastfeeding. It can be used with the br or kr files. Note, I create my own numeric mom ID and start it with a random number like "8" to prevent missing zeros.

gen long momid = ((8000 + v001) * 10000) + (v002 * 100) + v003
by momid (bidx), sort: gen byte lastchild = sum(b5) == 1 & sum(b5[_n - 1]) == 0
gen byte exlbreast_subpop = 1 if (v008 - b3) < 6 & lastchild == 1 & b9 == 0
 
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: Tanzania 2015 DHS nutritional indicators recoding
Next Topic: underweight status according to child's living arrangements
Goto Forum:
  


Current Time: Fri Nov 22 15:33:22 Coordinated Universal Time 2024