Announcement

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

  • Esttab r-squared help

    I created four regressions with the eststo command to put them all in the table with esttab. I used the following code ( esttab, se r2 label) for my specifications, however, the r2 appears blank, how can I fix this?

    I used xtreg to create my regressions if that helps.

    Also, I have these year variables that show when running esttab in the format (year=2005, year=2006, etc.) They appear as a result of me including time fixed effects in the regression (i.year). I tried applying the drop command in esttab, but this error returns
    =exp not allowed
    r(101);

  • #2
    estout is from SSC (FAQ Advice #12). xtreg outputs three R2 statistics; you probably want the within R2 with fixed effects models. You can use the -indicate- option to handle the year dummies. The following example illustrates:

    Code:
    webuse grunfeld, clear
    xtset company year
    xtreg invest mvalue kstock i.year, fe
    esttab ., drop(_cons) stats(N r2_w, labels(Observations Within-R2)) indicate("Year effects=*.year") 
    Res.:

    Code:
    . esttab ., drop(_cons) stats(N r2_w, labels(Observations Within-R2)) indicate("Year effects=*.year")
    
    ----------------------------
                          (1)  
                       invest  
    ----------------------------
    mvalue              0.118***
                       (8.56)  
    
    kstock              0.358***
                      (15.75)  
    
    Year effects          Yes  
    ----------------------------
    Observations          200  
    Within-R2           0.799  
    ----------------------------
    t statistics in parentheses
    * p<0.05, ** p<0.01, *** p<0.001

    Comment


    • #3
      Thank you for your reply. I have one more question though. When I run the xtreg command separately and then use ereturn list, all of the r2 variables are higher than if I use esttab for multiple xtreg regressions. For example, r2_w is 0.74 for an individual regression, but is 0.55 for that same regression when ran with multiple regressions using esttab. Thank you.

      Comment


      • #4
        Originally posted by Aleksandr Polusyan View Post
        When I run the xtreg command separately and then use ereturn list, all of the r2 variables are higher than if I use esttab for multiple xtreg regressions. For example, r2_w is 0.74 for an individual regression, but is 0.55 for that same regression when ran with multiple regressions using esttab. Thank you.
        I have never experienced this. You should present a reproducible example that illustrates this.

        Comment

        Working...
        X