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?