The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Merging data files » South Africa (1998): Merging Wealth Index with Individual Recode File in Stata
South Africa (1998): Merging Wealth Index with Individual Recode File in Stata [message #882] Tue, 29 October 2013 10:48 Go to previous message
synvox is currently offline  synvox
Messages: 2
Registered: October 2013
Member
I tried to merge Wealth Index file for South Africa (ZAWI31FL.DTA) with the Individual Recode file, but was unable to. I created a new variable in the IR file called whhid, from a substring of the CASEID:

gen whhid = substr(caseid,1,12) 


I then tried to merge the IR and WI files:

  merge whhid using "..."


I was told that "the variable whhid does not uniquely identify observations". How can I merge the WI and IR files in Stata?

I understand that the CASEID is 15 character string variable that is the household ID + 3 characters that represent the individual (CASEID = HHID + V003). I do not understand how to merge the two files given that it seems that there are no common/shared id variables.

Please provide Stata specific coding in your reply if possible!
 
Read Message
Read Message
Read Message
Previous Topic: Merging Women's & HIV Datasets
Next Topic: V001 and V002 do not uniquely identify observations in certain files?
Goto Forum:
  


Current Time: Fri Aug 30 05:08:13 Coordinated Universal Time 2024