Announcement

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

  • Calculating R-square in multi-level modelling

    Dear All,

    I would like to get the R-square for my two-level mixed analysis. I've screened through the posts here but I only found solutions to the xtmixed command. However, I am using a cross-sectional database, therefore I use the normal mixed command.

    Does anyone know how could I get the R-square?

    Thank you so much in advance!

    Kind regards,

    Bence Boross

  • #2
    Bence:
    -mixed- returns e(chi2), not R-sq (just like -xtreg,re- and -xtreg,mle-).
    Please also note that -xtmixed- is the old-fashioned name for -mixed- (typing -help xtmixed- gives back what follows):
    xtmixed has been renamed to mixed. xtmixed continues to work but, as of Stata 13, is no longer an official part of Stata. This is the original help file, which we will no longer update, so some links may no longer work.
    Last edited by Carlo Lazzaro; 22 Jun 2020, 11:01.
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3
      Dear Carlo ,

      Thank you so much for your fast reply. Unfortunately, I need pseudo-R-squared for my research. I tried to use the mlt package. However, it only works for xtmixed command. And I cannot use the xtset command since my dataset contains cross-sectional values.

      I also found this command to get the R-squared:


      predict y_p if e(sample)
      corr y y_p if e(sample)
      di r(rho)^2

      However, I am not sure if it gives me the right value.

      Can you help me how to derive the pseudo-R-squared?

      Kind regards,
      Bence

      Comment


      • #4
        Dear Carlo,

        As you said, I tried to use the xtmixed command. I did the following: xtset country. After comparing the results of the mixed and xtmiex command I saw that there are no differences in the outcomes.
        So now, I ran the mltrsq command and received the R-squared. I received the following outcomes. Can I consider them pseudo-R-squared? Which one I should report in my analysis? Now I have four different values.

        Snijders/Bosker R-squared Level 1: 0.0923
        Snijders/Bosker R-squared Level 2: 0.2330

        Bryk/Raudenbush R-squared Level 1: 0.0740
        Bryk/Raudenbush R-squared Level 2: 0.2778

        Kind regards,

        Bence Boross

        Comment

        Working...
        X