Announcement

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

  • How do I use outreg2 to display VALUE labels in its output?

    Take this code

    Code:
    sysuse auto, clear
    reg price mpg c.mpg#i.foreign
    outreg2 using "example.txt", stats(coef) replace
    This outputs

    Code:
        (1)
    VARIABLES    price
        
    price    
    mpg    -329.0***
    0b.foreign#co.mpg    0
    1.foreign#c.mpg    78.33**
    Constant    12,596***
        
    Observations    74
    R-squared    0.289
    Standard errors in parentheses    
    *** p<0.01, ** p<0.05, * p<0.1
    Ideally, I'd like it to display the value labels, as is done in the console's regression output:

    Code:
    -------------------------------------------------------------------------------
            price |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    --------------+----------------------------------------------------------------
              mpg |  -329.0368   61.46843    -5.35   0.000    -451.6014   -206.4723
                  |
    foreign#c.mpg |
         Foreign  |   78.32918   29.78726     2.63   0.010     18.93508    137.7233
                  |
            _cons |   12595.97   1235.936    10.19   0.000     10131.58    15060.35
    -------------------------------------------------------------------------------
    I don't need any of the other stats at the moment; I'm strictly including that last piece of output to show what I mean with the value labels. Searching through the documentation for outreg2 tells me how to display VARIABLE labels, but not VALUE labels.

    Also posted on Stackoverflow: http://stackoverflow.com/q/29679981/2766558
    Last edited by Michael Anbar; 16 Apr 2015, 09:55.

  • #2
    I asked a similar question and ended up finding that esttab works well. I still haven't received an answer about doing this with outreg2 though.
    Dear all, I am running a few regressions that include factor variables and their interactions, and I would like outreg2 to display factor value labels instead of

    Comment

    Working...
    X