Announcement

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

  • R-squared of linear mixed model

    On the FAQs list I found an article titled "Do-it-yourself-R-squared'.

    In the article, R-squared is calculated by using the correlation coefficient of the observed and predicted values of the outcome measure:
    predict y_p if e(sample)
    corr y y_p if e(sample)
    di r(rho)^2
    I understand that predict by default calculates the linear prediction from the fitted model (xb).

    Question:
    Does the proposed syntax also yields valid R-squared values after (xt)mixed?
    Last edited by Vincent Koppelmans; 19 Dec 2014, 16:48. Reason: Title typo + tags

  • #2
    Vincent_K (as per FAq, please note the preference on this forum for real full family names, too. Just click on the Contact us button at the bottom of this page for fine-tuning your registration. Thanks):
    this topic was covered in the following thread - http://www.stata.com/statalist/archi.../msg01073.html - that, in turn, recalls another one.
    Kind regards,
    Carlo
    (Stata 18.0 SE)

    Comment


    • #3
      Dear Carlo,

      Thank you for your reply.

      I am aware of the posts you are referring to that unfortunately do not answer my question.

      The post you are linking to directly discusses how to obtain the ICC.
      The post that is linked to within that post describes how to obtain pseudo R-squared. However, the pseudo R-squared obtained after xtmixed is quite different from that obtained after xtreg:

      Alternatively I also used xtmixed with random effects for the same level of clustering and I get different variance estimates and a different pseudo r2 at the cluster level from what I get using my computations and xtreg. (...) I appreciate any comments or suggestions, Clara
      (source)

      Nobody followed up on that post, so I am still not sure if the proposed code is suited for calculating pseudo R-squared. In addition, it does not tell me if the code from the page I refer to in my original post is suited for calculating R-squared after (xt)mixed.


      Comment


      • #4
        Hello, Vincent, have you solved the problem? I also want to get the answer.
        Please give me your syntax if convenient
        Thanks a lot~

        Best,
        Jennifer

        Comment


        • #5
          Hi Jennifer,

          Unfortunately not. If you would come across a way to do this later on, please do inform us.

          Thank you!

          - Vincent

          Comment

          Working...
          X