全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
7242 3
2016-12-28
两个数据集 分别是
01.png
01.png
输入命令

. use "C:\Users\jiaxuan\Desktop\raplace.dta", clear

. merge 1:1 id y using 2

用2.dta与raplace.dta合并 显示错误结果是:
key variable y is str4 in master but float in using data
    Each key variable -- the variables on which observations are matched --
    must be of the same generic type in the master and using datasets.  Same
    generic type means both numeric or both string.

我哪里错了呢?

二维码

扫码加我 拉你入群

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

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

全部回复
2016-12-29 00:56:34
y的格式需要在两个数据里一致。你一个是string一个是numeric,所以才会出现这个错误。都转成string或者numeric就好了。
二维码

扫码加我 拉你入群

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

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

2016-12-29 09:09:41
看上去 都是一致的呀 好的 我再去试试
二维码

扫码加我 拉你入群

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

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

2016-12-29 10:42:52
成功了 谢谢 明白了
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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