# Can the correlation of fixed effects be zero?

I'm analysing my data using linear mixed effects models and I have noticed that the high estimated correlation of fixed effects may be indicating some collinearity problem:

Correlation of Fixed Effects:
(Intr) typcmp gpbjct
typecomplex -0.588
gapobject   -0.588  0.500
typcmplx:gp  0.416 -0.707 -0.707


I've centered the predictors using the following code:

datsub$c.gap = factor(datsub$gap)
contrasts(datsub$c.gap) = c(1, -1) datsub$c.type = factor(datsub$type) contrasts(datsub$c.type) = c(1, -1)


I've run my model again, and now the correlation of fixed effects seems to be zero:

Correlation of Fixed Effects:
(Intr) c.typ1 c.gap1
c.type1     0.000
c.gap1      0.000  0.000
c.typ1:c.g1 0.000  0.000  0.000


Is this even possible? Am I centering my predictors in the wrong way?

• Do you have a balanced design? If so i would have thought it was possible. If you are not sure what I mean then show us the result of cross-tabulating type with gap. – mdewey Nov 15 '16 at 15:09
• Yes, I think I have a balanced design, I have approximately the same number of data points by condition (gap and type, each of them with two levels), between 13 and 16 data points per level and item. – serlosan Nov 15 '16 at 15:20

It appears you are using R. The code you show does not center your variables, it makes them factors (or does nothing if they were factors already). To center a variable, you subtract the variable's mean from every value. In your case, your use of contrasts() after turning the variables into factors does center them on $0$. If all your covariates are centered, it will make your variables uncorrelated with your intercept (cf., Why does the standard error of the intercept increase the further $\bar x$ is from 0?), but wouldn't make them uncorrelated with each other if they were correlated before centering. If you have categorical variables (factors), and you have equal $n_{ij}$s in every cell, your variables will also be perfectly uncorrelated (and uncorrelated with the intercept, since the intercept is then just the reference level of your factors). That should be true whether you use effect coding (1, -1) or reference level coding (0, 1).