Announcement

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

  • #16
    I made a comment on this issue yesterday in another thread about -xtmixed-. Since you are keeping this thread active, I thought I'd edit some of that content.

    Basically I speculated on why adjusted R-squared is not used for random effect models, and suggested using the information criterion indicators like AIC or BIC instead.

    My reasoning is this:

    Adjusted R-Squared in a OLS context basically corrects for the number of predictors. Below is the formula from the wiki page.



    For a random effect model, the predictors are separated into the "fixed" and "random" components. The former comes from the ordinary regressors in the model while the latter comes from the variances (or covariances if they do exist) of the random effect terms. Confounding these two sources into the one metric p is debatable, and no one seems to have done it for the R squared (actually people even disagreed on how to calculate the R squared for random effects models).

    The AIC and BIC indicators suffer from this same issue, but at least there is generally agreed upon convention in how to calculate them (which is, take the addition of the two components).

    Now if we were to insist using this same logic to calculate the adjusted R-squared for -xtreg,re-, the p in the above formula would simply be the number of ordinary regressors plus one (which comes from the sigma_u in the output of xtreg). ereturn list should give you the rest of the information needed to calculate this adjusted R-squared -- the number of ordinary regressors in e(rank), the n in e(N), and the R-squared overall in e(r2_o).

    *These are just developing thoughts. Feel free to correct me if something does not make sense.

    Comment


    • #17
      The formula of the wiki page isn't shown in your post (broken picture). It sounds logical but I don't see why people aren't using your method instead of using R-squared overall. Using a normal R-squared with more than a few predictors doesn't make any sense in my opinion.

      Comment


      • #18
        Originally posted by Victoria Rogers View Post
        It sounds logical but I don't see why people aren't using your method instead of using R-squared overall.
        Because you asked for an adjusted R squared in the thread. R squared overall (as well as R squared between and within) does not correct for the number of predictors, which is what adjusted R squared is supposed to do.

        Originally posted by Victoria Rogers View Post
        Using a normal R-squared with more than a few predictors doesn't make any sense in my opinion.
        If the regression model account for the panel data structure, there is no more "normal R-squared". -xtreg- returns three different values to approximate the normal R squared, and other researchers have suggested even more ways to derive a comparable value.

        Let me try to post the formula again with MathJax:
        \[
        \bar{R}^{2}=R^{2}-(1-R^{2})\frac{p}{n-p-1}
        \]

        If you can see it, this is basically the R squared value corrected for the number of observations (in n) and the number of predictors (in p). How to determine the R squared for a random effect models is a separate issue. My focus is on how to derive the p value.

        I am not even in favor of using adjusted R squared for model comparisons in the context of panel data. But you like to have the indicator (which I thought you do), I am suggesting a way that follows the convention of AIC and BIC.

        Comment


        • #19
          Dear All,
          as far as
          The AIC and BIC indicators...
          are concerned, unfortunately -estat ic- makes sense only after xtreg, fe (please, see -help xtreg postestimation - and not - help estat ic- , as I was mistaken in reporting in one of my previous reply).
          Kind regards,
          Carlo
          Kind regards,
          Carlo
          (StataNow 18.5)

          Comment


          • #20
            Carlo, thanks so much for the reminder. I overlooked that when adapting the entire idea to -xtreg,re-. The indicators are avaiable under -mixed- with -estat ic-.

            I have more experience with -mixed- and thought -xtreg,re- works pretty much the same. But it seems like -xtreg,re- does not even return the loglikelihood values for manual calculation of the AIC and BIC. There also seems to be slight discrepancies in the estimates--will have to look more into the cause.

            Comment


            • #21
              Aspen:
              I was bemused as well!
              Kind regards,
              Carlo
              Kind regards,
              Carlo
              (StataNow 18.5)

              Comment


              • #22
                Aspen:
                I was bemused as well!
                Kind regards,
                Carlo
                Kind regards,
                Carlo
                (StataNow 18.5)

                Comment

                Working...
                X