Announcement

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

  • eregress and estout

    Dear all,

    After using eregress to estimate a regression with endogenous treatment, I want to make a table in word where the first column will be the treatment equation, the second will be the outcome if the treatment is zero, and the third will be the outcome if the treatment is one.

    I used estout from ssc, with the unstack option [see code bellow] but I have two problems. First, there is a single equation for both outcomes, but I want to break it down by treatment. The second issue is that the variables in the outcome equation are interactions, but I want them to appear by their actual name.

    I have Stata15 and cannot use the collect command.

    Thank you in advance for your help,
    Nikos

    Code:
    use http://www.stata-press.com/data/r15/wageed
    eregress wage c.age##c.age tenure, entreat(college = i.peduc) vce(robust)
    esttab ., unstack

  • #2
    This is a partial answer to your questions.

    1. Use the -label- option to display value labels.
    2. You can select specific equations.

    As I do not follow how you want the final table to look like, here is the wage equation with labels from your example.

    Code:
    use http://www.stata-press.com/data/r15/wageed, clear
    eregress wage c.age##c.age tenure, entreat(college = i.peduc) vce(robust)
    esttab ., unstack label keep(wage:)
    Res.:

    Code:
    . esttab ., unstack label keep(wage:)
    
    ------------------------------------
                                  (1)   
                          Hourly wage   
                          Hourly wage   
    ------------------------------------
    no # Age in years           0.234***
                              (13.24)   
    
    yes # Age in years          0.678***
                              (30.83)   
    
    no # Age in years ~s     -0.00186***
                              (-9.79)   
    
    yes # Age in years~r     -0.00525***
                             (-22.14)   
    
    no # Job tenure             0.395***
                              (19.04)   
    
    yes # Job tenure            0.588***
                              (22.87)   
    
    no                          10.86***
                              (29.56)   
    
    yes                         3.184***
                               (6.90)   
    ------------------------------------
    Observations                 6000   
    ------------------------------------
    t statistics in parentheses
    * p<0.05, ** p<0.01, *** p<0.001
    
    .

    Comment

    Working...
    X