全部版块 我的主页
论坛 提问 悬赏 求职 新闻 读书 功能一区 经管百科 爱问频道
1272 1
2022-01-19
想把个人数据中基本医疗保险变量以家庭为单位进行整理,因此选用reshape命令,将长数据转换为宽数据,具体如下:
use "chfs2015_ind.dta",clear
keep hhid_2015 pline hinsurance1
reshape wide hinsurance1, i(hhid_2015) j(pline)

该命令在处理CHFS2015和2017年数据时顺畅无误,但是在处理2019年数据时遇到问题,显示错误如下:
no; data are mi set
    Use mi reshape to perform reshape on these data.  mi reshape has the same syntax as reshape.

    Perhaps you did not type reshape.  In that case, the command you typed calls reshape and it is not appropriate for
    use with mi data.  Use mi extract or mi xeq to select the data on which you want to run the command, which is
    probably m=0.

后续尝试使用mi reshape  mi extract与mi xeq都无法运行。
本科小白对数据处理不精,还望各位大佬指教,谢谢!

二维码

扫码加我 拉你入群

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

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

全部回复
2022-5-26 18:58:50
提示: 作者被禁止或删除 内容自动屏蔽
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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