全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
6632 4
2014-08-16
用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命令到底对数据有什么要求?数据是这几种格式都不能合并吗?


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2014-8-16 21:57:08
没有人知道吗
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2014-8-16 23:46:41
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2014-8-17 14:45:52
类型不一样
要统一
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2014-8-18 03:15:30
把要合并的主变量类型转换为一样的,应该就可以了
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群