[R-sig-ME] R.square in Mixed Models

d@iuedecke m@iii@g oii uke@de d@iuedecke m@iii@g oii uke@de
Fri Mar 22 19:06:27 CET 2019


Dear Tim,

r-squared values for mixed models are indeed a bit tricky. There have been some advancements in the past years, the most current publication on this issue I know is:

Nakagawa S, Johnson P, Schielzeth H (2017) The coefficient of determination R2 and intra-class correlation coefficient from generalized linear mixed-effects models revisted and expanded. J. R. Soc. Interface 14. doi: 10.1098/rsif.2017.0213

A function for calculating r-squared and ICC values (r2() and icc()) based on Nakagawa et al. are implemented in the sjstats-package, see an overview here:
https://strengejacke.github.io/sjstats/articles/mixedmodels-statistics.html

The latest proposal from Nakagawa et al. has an approach that computes the "mean" random effects variance, so it's also useful for models with random slopes or nested random effects.

A short side-note: I'm working on the re-organization of the sjstats-package, where some functions will be moved into other packages with specific focus. There is a new "re-implementation" of r2() in the insight-package (https://github.com/easystats/insight), called "get_variance()", which will be the basis for sjstats in the future in order to compute variance-components. "get_variance()" from the GitHub-version of the insight-package can also be used to calculate variances for model-objects from the nlme- or GLMMadaptive packages (and of course lme4, glmmTMB and rstanarm). R-squared-values or the ICC can easily be calculated once you have these variance-components extracted from a model, e.g.
  r2_marginal <- vars$var.fixed / (vars$var.fixed + vars$var.random + vars$var.residual)
  r2_conditional <- (vars$var.fixed + vars$var.random) / (vars$var.fixed + vars$var.random + vars$var.residual)

Best
Daniel


-----Ursprüngliche Nachricht-----
Von: R-sig-mixed-models <r-sig-mixed-models-bounces using r-project.org> Im Auftrag von Tim Richter-Heitmann
Gesendet: Freitag, 22. März 2019 18:17
An: r-sig-mixed-models using r-project.org
Betreff: [R-sig-ME] R.square in Mixed Models

Dear List,

i have used mixed models (six groups, 30 observation each) to model 
ecological interactions of protists with their environments.

I liked my models very much, but a reviewer now asked me to give 
R.square to show the explained variance of each model. I have now read a 
bit on that topic, and realized that r2s in GLMMs have limited value.

I did not want to argue my way out this request (because reviewers 
sometimes do not like this), so i generated some values with the MuMin 
package:

r.squaredGLMM(finalfit.sand.1)
            R2m       R2c
[1,] 0.2716636 0.2824504

It is understoodd that the first value represents my fixed effects, and 
the second value the sum of fixed and random effects. My task is to now 
properly interpret these values. Does this mean that my random effect 
(category, six levels) does only marginally contribute to the model fit, 
and if so, was my choice to introduce this random effect justified?

Thank you for taking your time.

-- 
Dr. Tim Richter-Heitmann

University of Bremen
Microbial Ecophysiology Group (AG Friedrich)
FB02 - Biologie/Chemie
Leobener Straße (NW2 A2130)
D-28359 Bremen
Tel.: 0049(0)421 218-63062
Fax: 0049(0)421 218-63069

_______________________________________________
R-sig-mixed-models using r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models

--

_____________________________________________________________________

Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg | www.uke.de
Vorstandsmitglieder: Prof. Dr. Burkhard Göke (Vorsitzender), Prof. Dr. Dr. Uwe Koch-Gromus, Joachim Prölß, Marya Verdel
_____________________________________________________________________

SAVE PAPER - THINK BEFORE PRINTING


More information about the R-sig-mixed-models mailing list