合并两个表格,主表是stkcd stknme nnindnme nnindcd type year2 万科A 房地产业 K70 K 2011/12/31
2 万科A 房地产业 K70 K 2012/12/31
2 万科A 房地产业 K70 K 2013/12/31
2 万科A 房地产业 K70 K 2014/12/31
4 国农科技 医药制造业 C27 C 2011/12/31
4 国农科技 医药制造业 C27 C 2012/12/31
4 国农科技 医药制造业 C27 C 2013/12/31
4 国农科技 医药制造业 C27 C 2014/12/31
5 世纪星源 房地产业 K70 K 2011/12/31
5 世纪星源 房地产业 K70 K 2012/12/31
5 世纪星源 房地产业 K70 K 2013/12/31
5 世纪星源 房地产业 K70 K 2014/12/31 。。。。还有很多
附表是
stkcd typrep inventory ppe year
2 A 2.1e+11 1.6e+09 2011-12-31
2 A 2.6e+11 1.6e+09 2012-12-31
2 A 3.3e+11 2.1e+09 2013-12-31
2 A 3.2e+11 2.3e+09 2014-12-31
4 A 4.2e+07 3.7e+07 2011-12-31
4 A 4.9e+07 4.7e+07 2012-12-31
4 A 8.2e+07 4.1e+07 2013-12-31
4 A 1.9e+08 3.8e+07 2014-12-31
5 A 1.5e+07 2.6e+07 2011-12-31
5 A 1.5e+07 2.4e+07 2012-12-31
5 A 1.5e+07 2.5e+07 2013-12-31
5 A 1.5e+07 2.6e+07 2014-12-31
两个变量确定一个唯一值(stkcd和year),检查了没有重复值
. duplicates list
Duplicates in terms of all variables
(0 observations are duplicates)
但合并时 merge 1:1 stkcd year using "C:\Users\hp-pc\Desktop\1.dta"
提示:variables stkcd year do not uniquely identify observations in the using data
r(459);实在不知道怎么办了,请大家帮忙看看,感激不尽!!