楼主: yaxxin
416 2

[面板数据求助] reshape出现r(9)错误 [推广有奖]

  • 0关注
  • 0粉丝

初中生

33%

还不是VIP/贵宾

-

威望
0
论坛币
0 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
98 点
帖子
11
精华
0
在线时间
5 小时
注册时间
2024-3-22
最后登录
2024-4-15

楼主
yaxxin 发表于 2024-3-25 00:06:51 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
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);
图片是我的数据和目前的错误情况,这怎么处理呢?
二维码

扫码加我 拉你入群

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

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

关键词:reshape Shape APE RES observations

2.png (181.93 KB)

2.png

1.png (206.56 KB)

1.png

沙发
wdlbcj 学生认证  发表于 2024-3-25 10:56:43
  reshape long E_score, i(证券代码) j(year)

藤椅
wdlbcj 学生认证  发表于 2024-3-25 10:57:48
问题在于 id  不是唯一的识别符 要检查一下 为什么数据中 RIC这个变量有重复值

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2026-1-6 10:31