Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • multiple line refcat with labels

    Hi,

    I am running two regressions and report coefficients by using esttab. I am trying to add two rows before a coefficient and want to have different labels in each column and row. In the first row, I need empty labels under both columns and in the second row, I need mean and standard deviation of a variable in column 1 and column 2 respectively. However, I can not report different labels and can only add one row. My code and the output are as follows:

    clear all
    sysuse auto.dta

    eststo clear
    regress price mpg trunk length, nocons
    estimates store model1

    regress price mpg weight gear_ratio displacement, nocons
    estimates store model2

    sum mpg
    local var1 = r(mean)
    local var2 = r(sd)

    esttab model1 model2, se ar2 compress varwidth(30) replace nonumber b(1) star(* 0.10 ** 0.05 *** 0.01) refcat(mpg "Sum Stats (mpg)" "Mean SD", label(" " " " `var1' `var2'))


    Click image for larger version

Name:	stata_output.png
Views:	2
Size:	12.0 KB
ID:	1659508


    Thank you very much for your help in advance.

    Ulas
    Attached Files
Working...
X