Merging issue [message #5589] |
Fri, 12 June 2015 18:42 |
chopotin
Messages: 11 Registered: June 2015
|
Member |
|
|
Hello!
I have Stata 12.1. For some reason I am having trouble merging the HIV dataset with the Individual dataset with Ethiopia 2011. I have merged these two types of datasets with other countries with no issues. However, after doing it with Ethiopia I get the following error message:
"variable id does not uniquely identify observations in the master data".
Here is my process for merging these two datasets:
1) First I open the HIV dataset and put the code: gen long id=((1000+hivclust)*10000)+(hivnumb*100)+hivline
2) Then I save it and open the Individual dataset and put the code: gen long id=((1000+v001)*10000)+(v002*100)+v003
3) I leave the individual dataset open and put the code to merge: merge 1:1 id using "C:/Users/EthiopaHIV2011.dta"
Then I get the error message as shown above.
Why is unique about the Ethiopia Individual and/or HIV dataset compared to other country datasets where this code does not work?
Thanks for any help you can provide ahead of time!
Leo
|
|
|