【问题标题】:using esttab: how to specify number of digits for summary statitics使用 esttab:如何指定汇总统计的位数
【发布时间】:2017-08-27 12:37:00
【问题描述】:

我正在使用estpostesttab 来生成汇总统计表。但是我不知道如何指定小数点后的位数。

estpost summarize beauty bmi whr weight height armlength urban age sleep2014 if gender == 1 & year == 2014
est sto m1

estpost summarize beauty bmi whr weight height armlength urban age sleep2014 if gender == 0 & year == 2014
est sto m2

estpost summarize beauty bmi whr weight height armlength urban age if gender == 1 & year == 2012
est sto m3

estpost summarize beauty bmi whr weight height armlength urban age if gender == 0 & year == 2012
est sto m4

esttab m1 m2 m3 m4 using summary.tex, cells("mean sd min max") title(Summary statistics) replace

我试过cells("mean(3) sd(3) min(2) max(2)"),但它不起作用。我通读了http://repec.org/bocode/e/estout/estpost.html 中的所有示例。所有示例仅保留最初用于汇总统计的位数。明确说明了如何处理回归结果,但我没有发现任何对汇总统计有用的东西。

【问题讨论】:

    标签: stata


    【解决方案1】:

    这里有一个例子:

    sysuse auto
    estpost summarize mpg price
    esttab . using summary.tex, title("summary stats") ///
        cells(mean(fmt(%5.3f)) sd(fmt(%5.3f)) min(fmt(%5.2f)) max(fmt(%5.2f))) 
    

    重要的是您在单元格选项中使用了 stat(fmt(format))。 为了找到这个,我使用了help estout 文档而不是help esttab

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-03-19
      • 2019-08-18
      相关资源
      最近更新 更多