[R-lang] Re: % of total variance accounted for by each predictor?

Daniel Ezra Johnson danielezrajohnson@gmail.com
Tue Aug 3 21:59:56 PDT 2010


> To calculate R2s for linear mixed models you only need to correlate the
> predictions against the actual outcome and square the results (=cor(outcome,
> fitted(lmer(outcome ~ .....)))^2). But be careful in the interpretation of
> the numbers. Most likely most of the variance the model captures will be due
> to the random participant intercepts. It's not uncommon that for, e.g. an R2
> of 50%, 45%+ of that come from the random intercept, while the remaining
> percent are due to the combined effect of the fixed effect predictors.

Note: although some people do suggest the above calculation, the
literature on "what is the best analog of R2 in a linear mixed model?"
is replete with many much more complicated alternative formulas,
tempered by healthy doses of the "don't do it at all" opinion
(sometimes from the same people).


More information about the ling-r-lang-L mailing list