The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Merging data files » Merging household and women's individual data Myanmar 2015-2016
Merging household and women's individual data Myanmar 2015-2016 [message #21897] Wed, 06 January 2021 17:21 Go to previous message
smiedem is currently offline  smiedem
Messages: 1
Registered: January 2021
Member
Hi, I'm trying to merge the household and women's individual data using the Myanmar DHS 2015-2016 using code provided in previous forum posts. However, it appears as though only 4,942 of 12,885 women interviewed were matched with household data. Below is the code I used (saving the hh data file as mdhs_hh and the women's file as mdhs_women). I used the women's data set as the base file, as recommended on the DHS Program merging datasets webpage. Any advice for why so few of the women are merging with the household data file? I checked the MDHS report and I could find no indication of why this may be. Thanks for any advice you may have.


use "C:\Users\qlu4\Desktop\mdhs_hh.dta"
gen v001=hv001 //recode hh survey cluster number variable to match women's data set
gen v002 = hv002 //recode hh survey household number variable to match women's data set
gen v003 = hv003 //recode hh
keep v001 v002 v003 sh148 sh148f sh149 sh150 sh151 sh152 sh153 sh154 sh155 sh156 sh157 sh158 sh159 sh160 sh161 //keep only relevant variables
sort v001 v002 v003
save "C:\Users\qlu4\Desktop\mdhs_hh.dta", replace

use "C:\Users\qlu4\Desktop\mdhs_women.dta"
sort v001 v002 v003
merge 1:m v001 v002 v003 using "C:\Users\qlu4\Desktop\mdhs_hh.dta"
-----------------------------------------

Result # of obs.

not matched 15,501
from master 7,943 (_merge==1)
from using 7,558 (_merge==2)

matched 4,942 (_merge==3)

I also tried merge 1:1 v001 v002 v003 using "C:\Users\qlu4\Desktop\mdhs_hh.dta", which gave me the same results...

Best,
Stephanie
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Merge PR and KR in wave 3, b16 does not exist
Next Topic: MERGING HIV DATASETS AND WOMEN DATASETS, DHS 2016-2017, HAITI.
Goto Forum:
  


Current Time: Fri Apr 26 21:42:42 Coordinated Universal Time 2024