My question may be a general question on merge command, but I was wondering if anyone could help with this issue.
My command is:
And I got the following message
So I checked with using data and found that several kiscodes' frequency is more than 1, which I think the source of the error message.
In this case, is there any common way of resolving the issue?
Since variables from using data (mkt_dummy, type_dummy) are simply dummy variables, my idea is that I simply make all the duplicated kiscodes in the using data appear only once and then merge, but this sounds not right to me. I just think that there should be way better solution than this.
The following is how using data looks like"
------------------ copy up to and including the previous line ------------------
Thank you.
My command is:
Code:
merge m:1 kiscode using yyy.dta, keepusing(mkt_dummy, type_dummy)
variable kiscode does not uniquely identify obs in the using data
In this case, is there any common way of resolving the issue?
Since variables from using data (mkt_dummy, type_dummy) are simply dummy variables, my idea is that I simply make all the duplicated kiscodes in the using data appear only once and then merge, but this sounds not right to me. I just think that there should be way better solution than this.
The following is how using data looks like"
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input long kiscode byte(mkt_dummy type_dummy) 814059 0 1 514039 0 1 501417 0 1 136088 0 1 370037 1 1 359203 0 1 370037 1 0 360120 0 0 370037 1 0 210226 0 0 370037 1 1 612049 0 1 840033 1 1 850390 1 1 99120 0 0 320013 0 0 340391 0 1 821705 0 1 330051 0 0 305736 0 0 324183 0 1 327930 0 1 351164 1 0 220035 1 0 351164 1 1 220035 1 1 293658 1 0 350516 1 0 148440 0 1 251569 0 1 361321 0 1 353353 0 1 810053 0 0 630306 0 0 620084 0 0 630306 0 0 620084 1 0 630306 0 0 620084 1 0 630306 0 0 870048 1 0 880990 0 0 381110 0 1 371475 0 1 381110 0 1 620190 0 1 500720 1 0 44292 0 0 451762 0 1 158488 0 1 751260 0 1 end
Thank you.
Comment