The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Merging data files » Merging from multiple countries
Merging from multiple countries [message #16054] Tue, 30 October 2018 18:47 Go to previous message
no7321
Messages: 2
Registered: January 2018
Location: usa
Member
Hi,

I created a pooled dataset with the most recent IR files of 6 South Asian countries (Afghanistan, Bangladesh, India, Maldives, Nepal, Pakistan)

I realized that I also needed a variable from the household files (how households treated their water, i.e. boiled etc.) and so wanted to merge HR data files with the pooled IR data set I created. I first created a pooled HR dataset with all of the same countries and then executed the following code:

/*merge HR to IR*/
use "E:\South Asia\dta\sasiahr.dta"
gen v000=hv000
gen v001=hv001
gen v002=hv002
gen v003=hv003
sort v000 v001 v002 v003
save "E:\South Asia\dta\sasiahr.dta", replace

use "E:\South Asia\dta\sasia.dta"
sort v000 v001 v002 v003
merge m:m v000 v001 v002 v003 using "E:\South Asia\dta\sasiahr.dta"

However, there are still many individual women from the IR dataset that are not matched to household records. The results from the merge show the following:

Result # of obs.
-----------------------------------------
not matched 935,707
from master 521,319 (_merge==1)
from using 414,388 (_merge==2)

matched 259,242 (_merge==3)


I'm wondering why I have 521,319 women from my master file (the IR file) not merged with the HR files? I thought all women interviewed would have a household record I could match them to.

Thanks for the help.


 
Read Message
Read Message
Read Message
Previous Topic: MERGING PR and IR data
Next Topic: Unmatched results after merging HR and IR
Goto Forum:
  


Current Time: Tue Apr 16 18:21:56 Coordinated Universal Time 2024