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:
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!