楼主: peyzf
12147 6

[回归分析求助] outreg2 如何添加新的统计量,如F统计值,以及相应的P值? [推广有奖]

  • 1关注
  • 63粉丝

警督

大师

59%

还不是VIP/贵宾

-

威望
2
论坛币
566901 个
通用积分
188.1504
学术水平
218 点
热心指数
240 点
信用等级
140 点
经验
132143 点
帖子
12795
精华
0
在线时间
2969 小时
注册时间
2007-9-8
最后登录
2024-4-24

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
rt.
二维码

扫码加我 拉你入群

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

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

关键词:outreg 统计量 REG Out 统计量

沙发
glacierccer 发表于 2011-6-26 11:04:38 |只看作者 |坛友微信交流群
outreg2 帮助文件example 9 讲的很清楚:
×××××××××××××××××××××××××××××××××××××××××××××××××××××××××
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: Type=Length=0", 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 the macro
    value into addstat( ). Save the first F statistic in a local macro:

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

    It 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)')
已有 2 人评分经验 论坛币 学术水平 热心指数 信用等级 收起 理由
xddlovejiao1314 + 10 + 1 + 1 + 1 精彩帖子
crystal8832 + 10 + 1 + 1 观点有启发

总评分: 经验 + 10  论坛币 + 10  学术水平 + 2  热心指数 + 2  信用等级 + 1   查看全部评分

使用道具

藤椅
peyzf 发表于 2011-6-27 00:02:02 |只看作者 |坛友微信交流群
thanks.

使用道具

板凳
emilychou 发表于 2013-8-31 02:57:13 |只看作者 |坛友微信交流群
怎样在输出多个est store的结果的时候同时输出这些scalar呢?
[fly]ilikeuandulikeme[/fly]

使用道具

报纸
mogui111 发表于 2015-7-13 23:20:27 |只看作者 |坛友微信交流群
emilychou 发表于 2013-8-31 02:57
怎样在输出多个est store的结果的时候同时输出这些scalar呢?
同问,求高手解答

使用道具

地板
boheshu 发表于 2019-5-6 23:23:41 |只看作者 |坛友微信交流群
glacierccer 发表于 2011-6-26 11:04
outreg2 帮助文件example 9 讲的很清楚:
×××××××××××××××××××××××××××××× ...
可是这里只讲了如何单独加入F检验的值,我如果想即加入调整R2又加入F,就再提醒我语法错误,请大佬帮忙看看语法哪里不对。
bysort Ownership:outreg2 using roe1-fenzu.xlsx,stats(coef,tstat) addstat(Ajusted R2,`e(r2_a)',F-test,`e(F)') excel replace:reg y x i.industry i.year

使用道具

7
yumo497 发表于 2022-3-20 18:39:20 |只看作者 |坛友微信交流群
boheshu 发表于 2019-5-6 23:23
可是这里只讲了如何单独加入F检验的值,我如果想即加入调整R2又加入F,就再提醒我语法错误,请大佬帮忙看 ...
我也想知道 你解决了吗

使用道具

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

本版微信群
加好友,备注jltj
拉您入交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-5-5 06:04