Some asked before "Why do random effect models require the effects to be uncorrelated with the input variables, while fixed effect models allow correlation?"

My question is: how do you check this assumption?

What I did is plot the residuals of the "fixed" effects against the residuals of "random effect"

v <- m.lme$residuals
attr(v,"std") <- NULL      # get rid of the additional attribute
plot(v[,1],v[,2] )

Then it shows a plot with correlated residuals. Is this the right way to test the assumption stated above? If yes, the assumption does not hold in this case. Is there anything else I can do?

Correlation of residuals in multilevel model


1 Answer 1


No, what you want to check is if there is a correlation of the REs with the fixed effect predictors, which would signify that you absorb fixed effect misspecification in the REs.

In R: extract the REs via ranef(m1) from model m1 (note the substructure) and plot them against the predictors, and interpret this like a usual normal residual plot.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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