全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
381 2
2024-03-25
reshape long E_Score, i(RIC) j(year)
(j = 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019
> 2020 2021 2022)
variable id does not uniquely identify the observations
    Your data are currently wide. You are performing a reshape long. You specified i(RIC) and j(year).
    In the current wide form, variable RIC should uniquely identify the observations. Remember this
    picture:

         long                                wide
        +---------------+                   +------------------+
        | i   j   a   b |                   | i   a1 a2  b1 b2 |
        |---------------| <--- reshape ---> |------------------|
        | 1   1   1   2 |                   | 1   1   3   2  4 |
        | 1   2   3   4 |                   | 2   5   7   6  8 |
        | 2   1   5   6 |                   +------------------+
        | 2   2   7   8 |
        +---------------+
    Type reshape error for a list of the problem observations.r(9);
图片是我的数据和目前的错误情况,这怎么处理呢?
附件列表
2.png

原图尺寸 181.93 KB

2.png

1.png

原图尺寸 206.56 KB

1.png

二维码

扫码加我 拉你入群

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

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

全部回复
2024-3-25 10:56:43
  reshape long E_score, i(证券代码) j(year)
二维码

扫码加我 拉你入群

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

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

2024-3-25 10:57:48
问题在于 id  不是唯一的识别符 要检查一下 为什么数据中 RIC这个变量有重复值
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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