The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Dataset use in Stata » Is there a way to add household member's information to birth's recode file?
Is there a way to add household member's information to birth's recode file? [message #9487] Sat, 02 April 2016 18:04 Go to next message
pm208 is currently offline  pm208
Messages: 1
Registered: October 2013
Member
Hi,

I am trying to merge household member's recode file to birth's recode file (m:1 merge) using Nepal DHS 2011. The ultimate goal is to merge all the birth and household member files and pool it across all the survey years in Nepal.

I understand that for variable b16, there are a few 0,99 and missing values with no line number in the household member file. And it is recommended that those observations be deleted before one merges it with the household file. However, if I am also interested in understanding household characteristics of children that are dead or live away from home, is there still a way to access household information for those children?

Thanks,
PM

[Updated on: Mon, 04 April 2016 11:55]

Report message to a moderator

Re: Is there a way to add household member's information to birth's recode file? [message #9541 is a reply to message #9487] Mon, 11 April 2016 10:08 Go to previous message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3016
Registered: February 2013
Senior Member
Following is a response from Senior DHS Stata Specialist, Tom Pullum:


If the child has died or is alive but not living with the mother, then it sounds like you want to link with the household information about the mother. I suggest that you use b16 as the line number if the child is alive and living with the mother, and otherwise use v003 (the mother's line number) as the child's line number. I recommend constructing a "child_status" variable along the way. I believe the following lines will work.

use BRfile

* You will not use "child_status" in the merge but it will help in the analysis
gen child_status=.
replace child_status=1 if b5==1
replace child_status=2 if b5==1 & (hv112==0 | hv112>=98)
replace child_status=3 if b5==0
tab child_status,m

label define child_status 1 "Alive and with mother" 2 "Alive and not with mother" 3 "Dead"
label values child_status child_status

rename v001 hv001
rename v002 hv002
gen hvidx=b16
replace hvidx=v003 if child_status>1
sort hv001 hv002 hvidx
save BRtemp


use PRfile

sort hv001 hv002 hvidx
merge hv001 hv002 hvidx using BRtemp
Previous Topic: treatment seeking for ARI: Bangladesh DHS 2014
Next Topic: Variables missed after appending two de-normalized DHS datasets
Goto Forum:
  


Current Time: Thu Mar 28 11:21:55 Coordinated Universal Time 2024