全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
1694 3
2021-06-27
不管是ivregress 2sls 还是ivregress2 2sls 还是ivreghdfe,不输出F值时,outreg2可以运行并输出回归结果,但每当想输出F值的时候:
outreg2 using $table/xxx.doc, append addstat(First stage F-stat, e(widstat)) dec(4)


outreg2 using $table/xxx.doc, cttop(first) tstat tdec(3) bdec(3) word replace


adds(IV F-stat,`fstat')
outreg2 using $table/ols_5.doc, cttop(second) word

都会显示
file /xxx.txt could not be opened r(603);

不知道是什么原因
二维码

扫码加我 拉你入群

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

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

全部回复
2021-6-28 12:58:41
outreg2 using d:\ols_5.doc, cttop(second) word  adds(IV F-stat,`e(F)')
二维码

扫码加我 拉你入群

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

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

2021-6-28 12:59:28
. webuse hsng2
(1980 Census housing data)

. ivregress 2sls rent pcturban (hsngval = faminc i.region), small


Instrumental variables (2SLS) regression

      Source |       SS       df       MS         Number of obs   =         50
-------------+------------------------------      F(  2,    47)   =      42.66
       Model |  36677.4033     2  18338.7017      Prob > F        =     0.0000
    Residual |  24565.7167    47  522.674823      R-squared       =     0.5989
-------------+------------------------------      Adj R-squared   =     0.5818
       Total |    61243.12    49  1249.85959      Root MSE        =     22.862

------------------------------------------------------------------------------
        rent |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
     hsngval |   .0022398   .0003388     6.61   0.000     .0015583    .0029213
    pcturban |    .081516   .3081528     0.26   0.793    -.5384074    .7014394
       _cons |   120.7065   15.70688     7.68   0.000     89.10834    152.3047
------------------------------------------------------------------------------
Instrumented:  hsngval
Instruments:   pcturban faminc 2.region 3.region 4.region

. outreg2 using d:\ols_5.doc, cttop(second) word  adds(IV F-stat,`e(F)')
d:\ols_5.doc
dir : seeout

.
二维码

扫码加我 拉你入群

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

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

2021-7-11 06:26:50
蓝色 发表于 2021-6-28 12:59
. webuse hsng2
(1980 Census housing data)
谢谢,但是还是显示txt could not be opened r(603);
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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