楼主的操作有问题啊。看看Stata自己的解释吧:
“m:m specifies a many-to-many merge and is a bad idea. In an m:m merge, observations are matched
within equal values of the key variable(s), with the first observation being matched to the first; the
second, to the second; and so on. If the master and using have an unequal number of observations
within the group, then the last observation of the shorter group is used repeatedly to match with
subsequent observations of the longer group. Thus m:m merges are dependent on the current sort
order—something which should never happen.
Because m:m merges are such a bad idea, we are not going to show you an example. If you think
that you need an m:m merge, then you probably need to work with your data so that you can use a
1:m or m:1 merge.”
可是我在论坛上看到有人是这么说的“joinby is used for the cartesian product or outer join. Merge is more about 1 to 1, 1 to many, many to 1 match. Try some data and you can see the differences. joinby is not used often.”
附上链接:https://bbs.pinggu.org/thread-2949443-1-1.html