I suspect that a test done by thousands of students has a dimensional problem (there are two or more dimensions influencing the students' chance of getting the items right).

I have a dichotomous matrix of responses from these students. I thought about testing this hypothesis with Principal Component Analysis on Standardized Residuals in R. However, I can't find any straightforward way to implement this analysis. Is there any package that can do it? Are there any other (or better) way for test this hypothesis?

  • 2
    $\begingroup$ You can fit a single factor CFA model using lavaan. $\endgroup$ Commented Mar 8, 2021 at 22:26

1 Answer 1


Good question. To be precise, the number of students in your sample should not change the number of hypothesized dimensions. Instead, this should be driven by the purpose of the analysis (e.g., test scoring, analysis group differences) and the item content. That being said, unidimensional models typically can be improved upon (in terms of model-data fit) in large samples when a moderate number of items are observed.

I agree with @Jeremy Miles that lavaan is a good choice. Below is some code for fitting a confirmatory factor analysis (CFA) model in R and extracting residuals.

HS.model <- ' visual  =~ x1 + x2 + x3
              textual =~ x4 + x5 + x6
              speed   =~ x7 + x8 + x9 '

fit <- cfa(HS.model, data = HolzingerSwineford1939)


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.