【问题标题】:Customizing tables in Stata在 Stata 中自定义表格
【发布时间】:2017-08-27 06:35:51
【问题描述】:

在 Windows 上使用Stata14,我想知道如何根据几个回归结果构建自定义表。这是一个例子。我们有

reg y, x1
predict resid1, residuals
summarize resid1

这给出了:

    Variable |        Obs        Mean    Std. Dev.       Min        Max
-------------+---------------------------------------------------------
      resid1 |  5,708,529    4.83e-11    .7039736  -3.057633   3.256382

再运行一次回归,同样得到残差:

reg y, x2
predict resid2, residuals

我想创建一个具有两个残差的两个标准差的表,并将其最佳输出到latex。我熟悉用于将回归结果输出到latexesttabestout 命令,但是这些对于上面示例中的自定义表不起作用。

【问题讨论】:

    标签: file-io output regression stata linear-regression


    【解决方案1】:

    您需要使用estpost。这应该可以帮助您入门。

    sysuse auto, clear
    regress price weight
    predict error1, residuals
    regress price trunk
    predict error2, residuals
    
    eststo clear
    estpost summarize error1 error2
    eststo
    esttab, cells("count mean sd min max") noobs nonum
    esttab using so.tex, cells("count mean sd min max") noobs nonum replace
    

    更多here.

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-04-04
      • 2019-07-22
      • 2015-03-29
      • 2013-07-25
      • 1970-01-01
      • 2014-08-13
      相关资源
      最近更新 更多