全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
5108 9
2022-02-04
请问各位大佬,在我使用 ivreghdfe命令对stata自带的auto数据进行处理,想要生成残差时,出现这样的错误提示:invalid suboptions in absorb(): resid(ehat)r(198);
我的命令是这样的:
sysuse auto,clear

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

扫码加我 拉你入群

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

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

全部回复
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     |
-----------------------------------------------------+
二维码

扫码加我 拉你入群

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

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

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

扫码加我 拉你入群

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

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

2022-5-7 22:02:04
请问解决了吗  也遇到了这个问题
二维码

扫码加我 拉你入群

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

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

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命令吗
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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