What is the best way to get the R2 values from linear mixed effects models?

I also saw this post before posting this: https://stackoverflow.com/questions/45327217/r-squared-of-lmer-model-fit. However, this post made me concerned about using Nakagawa & Schielzeth's (2013) R2glmm method link: (https://stackoverflow.com/questions/45327217/r-squared-of-lmer-model-fit). Is this method the "generally" agreed-upon way to get R-2 for linear mixed models with random effects?

Any help at all would be greatly appreciated!


1 Answer 1


The r2() function from sjPlot is implemented in r2_nakagawa() in package performance.

I think the approach from Nakagawa et al. is feasible and you can generally use it, as long as you acknowledge possible limitations. There's some discussion about R2 in mixed models, which might help you deciding if/what you would like to use:



  • $\begingroup$ Thanks for the information! $\endgroup$
    – Detr4
    Apr 16, 2022 at 18:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.