楼主: lalalala158
5107 9

[回归分析求助] 用ivreghdfe命令生成残差时,出现invalid suboptions in absorb(): resid(ehat) r(198 [推广有奖]

  • 3关注
  • 0粉丝

已卖:1份资源

本科生

73%

还不是VIP/贵宾

-

威望
0
论坛币
264 个
通用积分
0.7200
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
3191 点
帖子
13
精华
0
在线时间
204 小时
注册时间
2020-4-10
最后登录
2023-5-25

楼主
lalalala158 发表于 2022-2-4 00:26:00 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
请问各位大佬,在我使用 ivreghdfe命令对stata自带的auto数据进行处理,想要生成残差时,出现这样的错误提示:invalid suboptions in absorb(): resid(ehat)r(198);
我的命令是这样的:
sysuse auto,clear

*残差为ehat
ivreghdfe price weight (length=gear), absorb(trunk, resid(ehat))
请问要怎么解决这个问题呢?
二维码

扫码加我 拉你入群

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

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

关键词:options invalid absorb Option tions

沙发
蓝色 发表于 2022-2-5 09:59:15
没有问题,重新安装一下命令把


. ivreghdfe price weight (length=gear), absorb(trunk, resid(ehat))
(dropped 5 singleton observations)
(MWFE estimator converged in 1 iterations)

IV (2SLS) estimation
--------------------

Estimates efficient for homoskedasticity only
Statistics consistent for homoskedasticity only

                                                      Number of obs =       69
                                                      F(  2,    54) =     6.43
                                                      Prob > F      =   0.0031
Total (centered) SS     =  432058347.6                Centered R2   =   0.1024
Total (uncentered) SS   =  432058347.6                Uncentered R2 =   0.1024
Residual SS             =  387804729.6                Root MSE      =     2680

------------------------------------------------------------------------------
       price |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      length |   69.79144   735.9307     0.09   0.925    -1405.661    1545.244
      weight |   .8237046    16.7207     0.05   0.961    -32.69928    34.34669
------------------------------------------------------------------------------
Underidentification test (Anderson canon. corr. LM statistic):           0.371
                                                   Chi-sq(1) P-val =    0.5422
------------------------------------------------------------------------------
Weak identification test (Cragg-Donald Wald F statistic):                0.292
Stock-Yogo weak ID test critical values: 10% maximal IV size             16.38
                                         15% maximal IV size              8.96
                                         20% maximal IV size              6.66
                                         25% maximal IV size              5.53
Source: Stock-Yogo (2005).  Reproduced by permission.
------------------------------------------------------------------------------
Sargan statistic (overidentification test of all instruments):           0.000
                                                 (equation exactly identified)
------------------------------------------------------------------------------
Instrumented:         length
Included instruments: weight
Excluded instruments: gear_ratio
Partialled-out:       _cons
                      nb: total SS, model F and R2s are after partialling-out;
                          any small-sample adjustments include partialled-out
                          variables in regressor count K
------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------+
Absorbed FE | Categories  - Redundant  = Num. Coefs |
-------------+---------------------------------------|
       trunk |        13           0          13     |
-----------------------------------------------------+

藤椅
lalalala158 发表于 2022-2-23 20:44:34
谢谢您的回答。
但是我在https://github.com/sergiocorreia/ivreghdfe看到生成残差的命令是这样的
sysuse auto
ivreghdfe price weight, absorb(trunk) resid(myresidname)
这个是可以运行的,请问这个命令和我原来用的那个命令有什么差别吗,没有的话我应该可以用这个命令

板凳
Nrain04 发表于 2022-5-7 22:02:04
请问解决了吗  也遇到了这个问题

报纸
Nrain04 发表于 2022-5-7 22:02:29
lalalala158 发表于 2022-2-23 20:44
谢谢您的回答。
但是我在https://github.com/sergiocorreia/ivreghdfe看到生成残差的命令是这样的
sysuse ...
这个命令是不是没有用到工具变量啊

地板
小郭同学.. 发表于 2022-9-12 21:51:57
请问同样出现这个问题了,求问楼主怎样解决的,重新下载ivreghdfe命令吗

7
lalalala158 发表于 2022-9-21 22:37:47
Nrain04 发表于 2022-5-7 22:02
请问解决了吗  也遇到了这个问题
抱歉哈,没有解决,我重新装了一下stata和命令但是出现了新问题,报错last estimates not found

8
lalalala158 发表于 2022-9-21 22:38:07
Nrain04 发表于 2022-5-7 22:02
这个命令是不是没有用到工具变量啊
是的,没用到

9
lalalala158 发表于 2022-9-21 22:38:38
小郭同学.. 发表于 2022-9-12 21:51
请问同样出现这个问题了,求问楼主怎样解决的,重新下载ivreghdfe命令吗
我试过了,我的电脑没有用,你可以试一下

10
lalalala158 发表于 2022-9-22 01:19:01
家人们,我好像解决了,我把ivreghdfe price weight (length=gear), absorb(trunk, resid(ehat)) 改为了reghdfe price weight (length=gear), absorb(trunk) resid(ehat)就能运行了。
reghdfe price weight (length=gear), absorb(trunk) resid(ehat)
(dropped 5 singleton observations)
(converged in 1 iterations)

HDFE IV (2SLS) estimation
-------------------------

Estimates efficient for homoskedasticity only
Statistics consistent for homoskedasticity only

                                                      Number of obs =       69
                                                      F(  2,    54) =     6.43
                                                      Prob > F      =   0.0031
Total (centered) SS     =  432058347.6                Centered R2   =   0.2909
Total (uncentered) SS   =  432058347.6                Uncentered R2 =        .
Residual SS             =  387804729.6                Root MSE      =     2680

------------------------------------------------------------------------------
       price |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      length |   69.79144   735.9307     0.09   0.925    -1405.661    1545.244
      weight |   .8237046    16.7207     0.05   0.961    -32.69928    34.34669
------------------------------------------------------------------------------
Underidentification test (Anderson canon. corr. LM statistic):           0.371
                                                   Chi-sq(1) P-val =    0.5422
------------------------------------------------------------------------------
Weak identification test (Cragg-Donald Wald F statistic):                0.292
Stock-Yogo weak ID test critical values: 10% maximal IV size             16.38
                                         15% maximal IV size              8.96
                                         20% maximal IV size              6.66
                                         25% maximal IV size              5.53
Source: Stock-Yogo (2005).  Reproduced by permission.
------------------------------------------------------------------------------
Sargan statistic (overidentification test of all instruments):           0.000
                                                 (equation exactly identified)
------------------------------------------------------------------------------
Instrumented:         length
Included instruments: weight
Excluded instruments: gear_ratio
------------------------------------------------------------------------------

Absorbed degrees of freedom:
---------------------------------------------------------------+
Absorbed FE |  Num. Coefs.  =   Categories  -   Redundant     |
-------------+-------------------------------------------------|
       trunk |           13              13              0     |
---------------------------------------------------------------+

.

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

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