Announcement

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

  • Transform coefficients before using esttab

    Hi,

    I ran a basic OLS, but logged the independent variable and one of the dependent variables. I would like to export the results on Latex using esttab but would like to "exponeniate" all of the coefficients except the one which was logged and keep it as it is. I was wondering if there was an "easy" way to do this.

    Thanks

  • #2
    esttab is from SSC, as you are asked to explain. Please read FAQ Advice #12 and adhere to the advice of identifying community contributed commands in the future. If you want to exponentiate all coefficients, specify the -eform- option of esttab. For some but not all of the coefficients, you need estout's transform option as illustrated below.

    Code:
    sysuse auto, clear
    regress price mpg weight disp
    *Exponentiate mpg & weight but not displc.
    esttab, transform(mpg exp(@) exp(@) weight exp(@) exp(@))
    Res.:

    Code:
    . esttab, transform(mpg exp(@) exp(@) weight exp(@) exp(@))
    
    ----------------------------
                          (1)   
                        price   
    ----------------------------
    mpg              5.23e-23   
                      (-0.59)   
    
    weight              4.421   
                       (1.45)   
    
    displacement        2.358   
                       (0.33)   
    
    _cons              2304.5   
                       (0.61)   
    ----------------------------
    N                      74   
    ----------------------------
    t statistics in parentheses
    * p<0.05, ** p<0.01, *** p<0.001

    Comment

    Working...
    X