The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Merging data files » Merging Individual and HH Member Recode Files
Merging Individual and HH Member Recode Files [message #10419] Tue, 26 July 2016 15:37 Go to previous message
amw289
Messages: 5
Registered: July 2016
Member
Hello,

I am working with the continuous Peruvian DHS (2004-2012). I have created two data sets. The first is an appended file of all individual data files from 2004-2012. The second is an appended file of all household member data files from 2004-2012. For brevity, I refer to these as the "individual" and "household member" files below. Here are the steps I have taken:

1. Renamed hvidx to v003 in the household member file (to match the variable name in the individual file)
2. Attempted to merge from the individual file to the household member as follows:
1:m v000 v001 v002 v003 v007

*** When I did this, stata informed me that v000 v001 v002 v003 and v007 do not uniquely identify observations in the individual file. Upon further investigation, I discovered
288 duplicate observations in terms of v000 v001 v002 v003 v007. All duplicates are from the year 2012. Is this an accident? If not, how can I identify unique individuals and
create identifiers for them so that they can be merged with the household member dataset? ***

3. I then forcibly dropped the duplicate observations from the individual data set (just to see if I could successfully merge without them anyway).
4. Again I attempted to merge the individual file to the household member as follows:
1:m v000 v001 v002 v003 v007
The result of the attempted merge is as follows:

Result # of obs.
not matched 460,200
from master 29 (_merge==1) *these are observations from the individual file
from using 460,171 (_merge==2) *these are observations from the household member file
matched 135,622 (_merge==3)

***Of the 460,171 observations not matched from the household member file, 78% have eligible women in the household. What am I doing wrong? Why don't these households match to
any women in the individual file?***
***Why are there 29 women who don't match to any household member? Should all individual women have a corresponding household?***

Thank you so much in advance for your help. This has been perplexing me for quite some time!
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Merging Rwanda DHS 1992 without b16
Next Topic: NFHS 4 Data (Merging of PR and KR data file)
Goto Forum:
  


Current Time: Thu Mar 28 05:18:35 Coordinated Universal Time 2024