全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
20692 7
2017-03-14
stata中ologit之后,如何输出 Pseudo R2  呢,我用了outreg2和esttab都不能输出 Pseudo R2
esttab m1 m2 m3 m4  n1 n2 n3 n4,b(%6.3f) se(%6.2f) star(* 0.1 ** 0.05 *** 0.01)scalar(r2 r2_a N) compress nogap,不行,outreg不行



由于回归很多,不想一个一个粘贴啊
二维码

扫码加我 拉你入群

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

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

全部回复
2017-3-14 16:10:17
为什么不仔细看outreg2的帮助文件的例子呢?



Example 9. Adding r( ) e( ) scalars




    Additional statistics may be added with addstat( ) or addtext( ). Values stored in macros r( ), e( ), or s( )
    can be included directly. You can see what values are available by typing ereturn list or return list.


    To test the equality of two of the estimated coefficients and report the results in the table, note that test
    will sometimes return chi-squared, then you would instead use addstat(chi-square test, r(chi2)):


    reg mpg foreign weight length
    test foreign length
    outreg2 using myfile, adds(F-test, r(F), Prob > F, `r(p)') replace
    seeout


    To add results of lincom postestimation command to a table:


    sysuse auto, clear
    reg price mpg rep78 head
    lincom mpg + rep
    local tstat=r(estimate)/r(se)
    local pval = tprob(r(df), abs(`tstat'))
    outreg2 using "myfile", adds(joint, r(estimate), t-stat, `tstat', p-val,`pval') replace see


    In some cases it is better to save the value of a previously calculated statistic in a local macro and then
    put that into addstat( ):


    regress mpg rep78 headroom
    test rep78
    local F1 = r(F)
    test headroom
    outreg2 using 2test, addstat(Test1 F, `F1', Test2 F, `r(F)')


    If it is missing, outreg2 will automatically calculate e(p), which is presumably the F-test or chi-square-test
    of significance of a regression.


    outreg2 using myfile, addstat(F test, e(p))


   Another example would be to report a pseudo R-squared after a logit estimation, which outreg2 does not
    otherwise report.

    logit foreign price trunk weight
    outreg2 using myfile, addstat(Pseudo R-squared, `e(r2_p)')



二维码

扫码加我 拉你入群

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

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

2017-3-14 18:16:29
蓝色 发表于 2017-3-14 16:10
为什么不仔细看outreg2的帮助文件的例子呢?
谢谢~~
二维码

扫码加我 拉你入群

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

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

2017-3-14 18:39:15
蓝色 发表于 2017-3-14 16:10
为什么不仔细看outreg2的帮助文件的例子呢?
谢啦~~~
二维码

扫码加我 拉你入群

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

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

2017-11-26 01:42:58
飞转的时光 发表于 2017-3-14 15:45
stata中ologit之后,如何输出 Pseudo R2  呢,我用了outreg2和esttab都不能输出 Pseudo R2
esttab m1 m2  ...
后面加pr2就行了
二维码

扫码加我 拉你入群

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

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

2019-4-15 16:14:52
蓝色 发表于 2017-3-14 16:10
为什么不仔细看outreg2的帮助文件的例子呢?
我进行了probit回归和ivprobit回归之后,怎么用outreg2输出chi2呢?我在后面添加了addstat(chi2, r(chi2)),显示invalid syntax
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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