Announcement

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

  • Correlated Random Effects Goodness of Fit

    Dear all,
    I have a panel with 345 observations and six variables. My cross-sectional variable is Panel_bland (15 groups) and my time-series variable is Panel_year (23 years).
    I xtreg a correlated random effect model (Mundlak). I am analysing the results and saw that no R-squared has been produced.
    I know Stata must have a good reason for not displaying it as R-squared might not be a good measure.
    What might be a good alternative to assess how much of the variation can be explained by the chosen variables?
    Thank you in advance.
    Caroline

  • #2
    Caroline:
    actually you can retrieve various R-squared from the community-contributed command -mundlak- (please note that you're kindly requested to declare when you use a non-official Stata command, for good reasons that are even better explained in the FAQ. Thanks), as you can se from the following toy-example:
    Code:
    . webuse nlswork, clear
    (National Longitudinal Survey.  Young Women 14-26 years of age in 1968)
    
    . mundlak ln_wage age south, stats(N N_g rho r2_o r2_w r2_b)
    
    +------------------------------------------------+
    |             Variable |     RE     |  Mundlak   |
    |----------------------+------------+------------|
    |                  age |      0.019 |      0.018 |
    |                south |     -0.131 |     -0.077 |
    |            mean__age |            |      0.006 |
    |          mean__south |            |     -0.119 |
    |                _cons |      1.169 |      1.049 |
    |----------------------+------------+------------|
    |                    N |      28502 |      28502 |
    |                  N_g |   4710.000 |   4710.000 |
    |                  rho |      0.583 |      0.583 |
    |                 r2_o |      0.115 |      0.121 |
    |                 r2_w |      0.104 |      0.104 |
    |                 r2_b |      0.132 |      0.133 |
    +------------------------------------------------+
    That said, with such a large T dimension, I would have considered -xtgls- or -xtregar- instead of -xtreg-.
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3
      Dear Carlo,
      thank you for your response and the suggestion.
      I am not using the - mundlak - command as there were some specifics which required me to run the - xtreg...,re- and include the means manually.
      Is there a way to compute the R-squared without using the mundlak package?
      Thank you for your input on the t-dimensions and possible alternatives.
      Kindly,
      Caroline

      Comment


      • #4
        Caroline:
        I'm not sure I'm following your approach right.
        If you use -xtreg,re- it gives you back by default within, between (the most important) and overall R-squares.
        Kind regards,
        Carlo
        (StataNow 18.5)

        Comment

        Working...
        X