Would there be any problem with using principal component analysis (e.g. for reduction of dimensionality) so that principal components scores could be used as predictors in a mixed-model? For non-mixed models this strategy is frequently applied (principal component regression) but I am not sure if it is applicable in the context of mixed-models?

Please see below a dummy example in R:

USArrests$score <- prcomp(USArrests[,-1], scale = TRUE)$x[,1]
USArrests$group[1:25)] <- "A"
USArrests$group[26:50] <- "B"
m1 <- lmer(Murder~1+score+(1|group), data=USArrests)
  • $\begingroup$ I don't see why using this strategy in a mixed model would be any different, especially if you are treating the PCA score as a fixed effect, which it seems like you are in your example? $\endgroup$ Commented May 5, 2012 at 19:02

1 Answer 1


I've arrived at this post while trying to find my own answer to a similar question (i'm a year late I know). A PCA I've done on nested data is producing some pairs of axes which are highly correlated when you account for the nesting. So makes me think a standard PCA is inappropriate for nested data.... or at least some of the things you assume it will do (like creating new uncorrelated variables) wont necessarily be the case. My own question about this is posted here:

principal components analysis is creating correlated axes with nested data


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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