The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Countries » Bangladesh » looking for appropriate variable
looking for appropriate variable [message #2198] Fri, 23 May 2014 10:15 Go to next message
sha_016 is currently offline  sha_016
Messages: 4
Registered: March 2014
Location: Antwerp, Belgium
Member

Could anyone help me to find out the variable says total number of respondents having live birth (1+) in the last three years preceding survey?
thanks!
Re: looking for appropriate variable [message #2205 is a reply to message #2198] Mon, 26 May 2014 15:29 Go to previous message
Reduced-For(u)m
Messages: 292
Registered: March 2013
Senior Member


One way to do this would be to use the birth recode, generate a variable for "born in the last three years*", and then use an egen command to count those up by household id. Something like this if you are using Stata:

gen last3yr = bdate > surveydate-36
*(using months and years combined as dates)

egen hadbirth = max(last3yr), by(hhid)
*this implicitly asks if any entry with the same household id (hhid) had a value of 1 for born in last 3 years (all rest are 0), and puts the same value in the variable for all entries with that household id.

collapse hadbirth, by(hhid)
*reduce to one observation per hhid

and now you have a list of women/households with a variable that is 0 if they didn't have a birth and 1 if they did, with one observation per household.

I believe that the "birth recode" and "child recode" are slightly different in that one gives children born to the respondent, and one children in the household. You should choose the appropriate recode for your question, and use the appropriate identifier (hhid, womanid, etc.) depending on what you want to know - sorry I don't have time to go back and confirm all the real variable names, but this should get you started.
Previous Topic: Calculating the current use of contraceptive by age group
Next Topic: BDHS 2011 administrative block
Goto Forum:
  


Current Time: Thu Mar 28 20:52:27 Coordinated Universal Time 2024