用stata 合并两个数据库,合并时使用的key variables 有4个:id1,id2,id3,year, 都是8位以内的数值。但是merge命令(merge 1:1 id1 id2 id3 year using filename)输完后总是跳出错误提示:r(106)name is byte in using data。
详情:error . . . . . . . . . . . . . . . . . . . . . . . . Return code 106 __________ is __________ in using data;
You have attempted to match-merge two datasets, but one of the
key variables is a string in one dataset and a numeric in the
other. The first blank is filled in with the variable name
and the second blank with the storage type. It is logically
impossible to fulfill your request. Perhaps you meant another
variable.
我还是没看明白到底哪里有问题,导致我无法merge成功。希望高手能解答下!感激不尽!
后来发现那个错误提示里的"name"指的是我using data 中的一个变量名,那个变量的格式是byte. 后来我将这个变量格式改成了string, 再merge,又没成功,错误提示告诉我因为 using data中的一个变量格式是str15, merge命令到底对数据有什么要求?数据是这几种格式都不能合并吗?