The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Merging data files » Merging IR and HR files for Bangladesh
Merging IR and HR files for Bangladesh [message #27301] Sat, 15 July 2023 10:53 Go to previous message
Ghose is currently offline  Ghose
Messages: 17
Registered: May 2018
Member
Hi,

I am trying to merge the IR and HR files for Bangladesh, and getting a very small number of matched observations. In comparison, merging IR with PR retains all observations, which is confusing me.
So, could you check the codes and please let me know if this is the right way to do the matching?

1. IR & HR merge
. use "/Users/ghose/Downloads/BDHR7RDT/BDHR7RFL.DTA"

. rename (hv001 hv002 hvidx_01) (v001 v002 v003)
. sort v001 v002 v003

. merge m:1 v001 v002 v003 using "/Users/ghose/Downloads/BDIR7RDT/BDIR7RFL.DTA"

Result # of obs.
-----------------------------------------
not matched 35,510
from master 17,420 (_merge==1)
from using 18,090 (_merge==2)

matched 2,037 (_merge==3)
-----------------------------------------


2. IR & PR merge

. rename (hv001 hv002 hvidx) (v001 v002 v003)
. sort v001 v002 v003
. merge m:1 v001 v002 v003 using "/Users/ghose/Downloads/BDIR7RDT/BDIR7RFL.DTA"

Result # of obs.
-----------------------------------------
not matched 69,692
from master 69,692 (_merge==1)
from using 0 (_merge==2)

matched 20,127 (_merge==3)


Thanks in advance!


 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Disability in HR with characteristics from IR and MR
Next Topic: Merging KR file with PR file India DHS 2019-21 (NFHS-5)
Goto Forum:
  


Current Time: Sun Dec 1 16:16:45 Coordinated Universal Time 2024