Announcement

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

  • Extract R-square in panel data regressions

    Dear all,

    I have used the following statement to save R-square in panel data regressions, some of the R-square. My understanding is that R-square can't be negative.

    Could someone point out if my thinking is wrong or the code I use was wrong.



    Code:
    egen both = group(firm year)
    
    statsby _b _se r2 = e(r2_a), by (both) saving(Rsquare): regress y x1 x2 x3 , robust

    thank you,

    Rochelle

  • #2
    R squared can't be negative, but e(r2_a) is adjusted R squared, which can be negative. If you want R squared, use e(r2) instead.

    Comment


    • #3
      Dear Clyde,

      You are always so helpful !!! Thank you!!!

      Rochelle

      Comment

      Working...
      X