Skip to content
Prev 18845 / 20628 Next

Variance of the fixed effects lme4

(once again without PGP signing)

I would strongly advise against depending on any R2 version for
mixed-models. Despite that blog posts claim about their preferred
definition, there isn't really any consensus on what R2 would look like.
Moreover, for fundamental reasons, there isn't any measure that will
have the properties of R2 from classical OLS/fixed-effecs regression.
See e.g.

https://bbolker.github.io/mixedmodels-misc/glmmFAQ.html#how-do-i-compute-a-coefficient-of-determination-r2-or-an-analogue-for-glmms
(including linked threads  and the section "Variable importance")

Various R2 measures -- including  Nakagawa and Shielzeth -- are
implemented in that discussion and linked packages.

For a perhaps more intuitive example of why R2 is not clearly defined
for mixed models, note that many definitions of R2 are something like

1 - var(null_model) / var(model)

where the null_model is the intercepts-only model. But is the intercepts
only model? Is it just the fixed-effects intercept? Is it just the
random-effects intercept? (And if you have more than one grouping
variable, which of these make the cut?) Is it both the fixed- and
random-effects intercepts? Do we care more about the variance explained
by the fixed effects, the random effects or by both? (Note that the
"marginal" and "conditional" R2 discussed in that blog post only cover 2
out of 3 of those possibilities.)

And this is before getting into all the problems with R2 as a measure in
general -- there are lots of discussions of the problems of R2, even
when applied to classical OLS regression. For example, aggregating or
binning data can increase R2, even though the model may now explain less
of the variance in the original data.


Phillip
On 26/10/20 8:42 am, Simon Harmel wrote: