Announcement

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

  • Reporting coefficients, standard errors and p value at the bottom of the regresion table

    Dear all,

    I want to run a few regressions using different controls in each and report all estimates in a table
    and coefficients main independent variable (ONLY) with std errors and p values at the bottom of the table.


    I did outreg2.........stats(coef se pval) but that puts these stats in a separate column. I want them at the bottom of my table. How can we do that?
    I did addstat. But that doesn't work.

    Thanks.
    Last edited by Lars Pete; 27 Mar 2021, 20:36.

  • #2
    outreg2 is from SSC, as you are asked to explain (FAQ Advice #12). For estout/ esttab (SSC) and discussion on why this request is unusual, see https://www.statalist.org/forums/for...m-of-the-table.

    Code:
    sysuse auto, clear
    regress price weight mpg foreign c.mpg#c.foreign
    local b_weight= `:di %5.3f _b[weight]'
    local se_weight= `:di %5.3f _se[weight]'
    local p_weight=  cond(r(table)["pvalue","weight"] < 0.001, "<0.001", "`:di %5.3f r(table)["pvalue","weight"]'")
    outreg2 using myfile, adds(b_weight, `b_weight',se_weight, `se_weight') addt(p_weight, `p_weight') drop(weight) noobs nor2 replace


    Res.:

    Code:
     
    (1)
    VARIABLES price
    mpg 263.2**
    (110.8)
    foreign 11,240***
    (2,752)
    c.mpg#c.foreign -307.2***
    (108.5)
    Constant -14,450***
    (4,426)
    p_weight <0.001
    b_weight 4.614
    se_weight 0.725
    Last edited by Andrew Musau; 28 Mar 2021, 13:54.

    Comment

    Working...
    X