全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
1281 8
2023-12-04
我用reshpe进行数据转置,结果却显示这样
values of variable year not unique within hhcode
    Your data are currently long.  You are performing a reshape wide.  You
    specified i(hhcode) and j(year).  There are observations within i(hhcode)
    with the same value of j(year).  In the long data, variables i() and j()
    together must uniquely identify the observations.

但是我的年份和我的身份代码是一一对应的,结果还是不成功

二维码

扫码加我 拉你入群

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

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

全部回复
2023-12-4 13:43:26
用这里方法提供数据才能知道原因


让巧妇有米可炊 (提問時,如何附上適當的資料)
https://bbs.pinggu.org/forum.php ... 204&from^^uid=902
二维码

扫码加我 拉你入群

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

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

2023-12-4 20:54:44
这个报错不是很明显么?不能用reshape long,要用reshape wide
stata数据分析交流3群 706059301
二维码

扫码加我 拉你入群

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

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

2023-12-5 12:03:55
陈小丽 发表于 2023-12-4 20:54
这个报错不是很明显么?不能用reshape long,要用reshape wide
stata数据分析交流3群 706059301
我用的就是wide
二维码

扫码加我 拉你入群

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

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

2023-12-6 08:01:12
检查识别变量和时间变量的格式,格式错误,也无法运行
二维码

扫码加我 拉你入群

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

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

2023-12-6 08:54:20
In the long data, variables i() and j()
    together must uniquely identify the observations.
这说明,你的i、j不能唯一标识一行数据

我的理解
二维码

扫码加我 拉你入群

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

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

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

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