Standardized beta weights for a multilevel regression

How can one obtain standardized (fixed effect) regression weights from a multilevel regression?

And, as an "add-on": What is the easiest way to obtain these standardized weights from a mer-object (from the lmer function of the lme4package in R)?

• Specifically mer or you are asking for any linear model coefficients? Feb 6, 2012 at 15:43
• Actually I'm more interested on how to do it generally (I would standardize all variables beforehand, as in regular linear models, but I'm not sure if that approach is valid in MLMs). Above, I would like to see how it is done with lme4 objects. I rephrased the question accordingly! Feb 6, 2012 at 16:40
• You may be interested in this paper by Andrew Gelman and Iain Pardoe (2007) Average Predictive Comparisons for Models with Nonlinearity, Interactions, and Variance Components. Feb 6, 2012 at 17:36

Simply scale your explanatory variables to having mean of zero and variance of one before you put them in the model. Then the coefficients will all be comparable. The mixed effects nature of the model doesn't impact on this issue.

The best way to do it, and least likely to go wrong, is to use scale() before you fit the model.

• Thanks, that's what I wanted to know: rescaling to the grand mean (ignoring the group structure ...). Feb 7, 2012 at 8:19

For standard linear models regressed with lm() you can either scale() your predictors data or just use this simple formula:

lm.results = lm(mydata$Y ~ mydata$x1)

sd.y = sd(mydata$Y) sd.x1 = sd(mydata$x1)
x1.Beta = coef(lm.results)["mydata\$x1"] * (sd.x1 / sd.y)


For a quick way to get at the standardized beta coefficients directly from any lm (or glm) model in R, try using lm.beta(model) from the QuantPsyc package. For example:

library("MASS")
glmModel = glm(dependentResponseVar ~ predictor1 + predictor2, data=myData)
summary(glmModel)

library(QuantPsyc)
lm.beta(glmModel)

• In this e-mail Ben Bolker translated this function to "lmer-land".
– crsh
Nov 3, 2013 at 18:47
• But the linked code that Ben provides isn't actually functional as written in that email, it doesn't look like. It includes words/pseudocode.... Edit: The answer to this question will provide the working code: stats.stackexchange.com/questions/123366/… Jan 10, 2017 at 14:55

Assuming you have set the output of your lmer model to lmer.results, fixef(lmer.results) will return the overall fixed effects coefficients.

• They won't be "standardized" though, will they? I read the question as wanting to know the size of fixed effects if the explanatory variables were all on the same scale. Feb 6, 2012 at 18:59
• I don't know that it is possible to get the standardised coefficients from a mer object - they don't appear in the summary, so I assume the lme4 methods don't create them. fixef() will return all fixed effect information available from a mer object. Feb 6, 2012 at 19:46
• As Peter already commented: the focus of the question was about the 'standardized' coefficients ... Feb 7, 2012 at 8:18