The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Merging data files » Merging Male with Birth data?
Re: Merging Male with Birth data? [message #25331 is a reply to message #423] Wed, 05 October 2022 13:30 Go to previous messageGo to previous message
Sandipa is currently offline  Sandipa
Messages: 1
Registered: October 2022
Member
Hi,

Can someone help me with merging the child births with their parents information i.e. merging the IR, MR and BR file. I need information on the child and parental background information for my analysis. I checked the DHS forum for such a merge but I didn't find any great answer to this question. The merges are mainly concentrated within the household level i.e. PR file. I need my unit of observation as the child. And I need this information for both NFHS-4 and NFHS-5. I can append the two once I do the merging correctly. Below is the code I used. But I don't think that identifies correctly and uniquely the parents of the child.

IR file:

use "IAIR7BFL.dta", clear
gen in_IR=1
rename v001 hv001 /*Sample-specific cluster number*/
rename v002 hv002 /*Household number in cluster*/
rename v003 hvidx /*Household line number of woman respondent*/
gen mo_line=hvidx
sort hv001 hv002 mo_line

*kept all the variables I needed for the mother (ex: education, birth history etc)

MR file:

use "IAMR7BFL.dta", clear
gen in_MR=1
rename mv001 hv001
rename mv002 hv002
rename mv003 hvidx
gen fa_line=hvidx
sort hv001 hv002 fa_line

*kept all the variables I needed for the father (ex: education, birth history etc)

BR file:
use "IABR7BFL.dta", clear
keep if b5==1 /*Chlid is alive*/
gen in_BR=1
rename v001 hv001
rename v002 hv002
rename b16 hvidx
sort hv001 hv002 hvidx

*kept all the variables I needed for the child (ex: birth details etc)

Now how to uniquely match the child with their parents?


 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Merging household level data set with men and women dataset
Next Topic: Merging KR with PR
Goto Forum:
  


Current Time: Mon Apr 29 06:46:18 Coordinated Universal Time 2024