I needed to run a PCA on a dataset with a multilevel structure. My question is similar to the one asked here: Principal components analysis on nested data

In my case, however, the two levels are crossed rather than nested. Is there an R package for this? Would it be better to just report by-item and by-subject results?

A bit of context on the study: the data results from experiments where proofreaders (subjects) checked a number of written sentences (items). All proofreaders saw all sentences. I want to investigate correlations across multiple measures of proofreading behaviour (proofreading time, number of editing operations, etc.)

I'd be happy to just go with by-item and by-subject analyses, but results are quite different and I'm not sure about how to interpret this. Biplots show that the proofreading behaviour variables are much more correlated with each other in the by-item analysis. Would this be due to high between-subject variability, making the by-item analysis more reliable?

  • $\begingroup$ You can always run PCA on the mutlivariate data and then use an LME on the scores to account for the levels. It should work fine. Otherwise you have a strong identifiability issue. $\endgroup$
    – usεr11852
    Commented May 6, 2016 at 19:06
  • $\begingroup$ @usεr11852 but LME doesn't do what I want... I don't have an outcome variable. The idea is inspecting how close together/far apart all variables are, so it's more of an explorative approach rather than hypothesis testing. Biplots would be the best way to visualise this I guess, so what I'd need is a method that'd allow me to account for the levels graphically in a biplot. Not sure if that exists... $\endgroup$ Commented May 6, 2016 at 22:11
  • 1
    $\begingroup$ OK, I understand what you mean now. How about controlling in an LME each proofreading behaviour for subject and item effect first individually and then using the residuals for your biplots? That way you would have factored out the multilevel structure of your behaviour data. $\endgroup$
    – usεr11852
    Commented May 7, 2016 at 1:57
  • $\begingroup$ @usεr11852 hadn't thought of that... Makes sense to me and seems like quite a simple solution. Have you seen this anywhere or would you know of any source I could cite on residuralization being used as a way to get round the independence assumption? $\endgroup$ Commented May 8, 2016 at 0:01
  • 1
    $\begingroup$ I have seen this many times in Paediatrics studies where people say "we examine $X$ after controlling for variable $Y$ and $Y^*$. I do not work on item-response theory unfortunately. I have not seen it cited - I think just writing it out is enough as it is a straight-forward procedure stemming from a basic regression application. $\endgroup$
    – usεr11852
    Commented May 8, 2016 at 5:35

1 Answer 1


Here it is a paper doing PCA for all combinations of data structures, including crossed effects


Here it is a paper doing the same thing for longitudinal multivariate data


The exact same ideas apply to non-functional (multivariate data)

  • 3
    $\begingroup$ Welcome to the site. We are trying to build a permanent repository of high-quality statistical information in the form of questions & answers. Thus, we're wary of link-only answers, due to linkrot. Can you post full citations & summaries of the information at the links, in case they go dead? $\endgroup$ Commented Jun 23, 2016 at 1:12
  • $\begingroup$ I added both links to the Internet Archive (waybackmachine). $\endgroup$
    – michen00
    Commented Oct 31, 2021 at 19:00

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.