Factor Analysis
In Lesson 1, PCA took Rosa's four flower measurements and compressed them into a couple of readable directions. It answered one question: which directions capture the most spread? Factor analysis answers a different, deeper one: what hidden things could have produced these measurements in the first place?
Meet Priya, a school counselor. At the end of term she has percentage scores for 250 students in six subjects: reading, vocabulary and essay writing (English), and arithmetic, algebra and geometry (maths). When she lines the columns up and looks at how they move together, a pattern jumps out, shown in the grid below. The three English subjects rise and fall together. The three maths subjects rise and fall together. But an English score tells you almost nothing about a maths score.
Priya never gave a test called "language ability" or "number ability". Yet it is as if two such hidden abilities are quietly steering all six columns. Factor analysis is the tool that finds them.
By the end of this lesson you will be able to:
- Say what a latent (hidden) factor is, and how the common-factor model explains a set of correlations
- Run factor analysis in R, then read the loadings, communalities and uniquenesses
- Decide how many factors to keep, rotate them so you can name them, and say how all this differs from PCA
Prerequisites: Lesson 1, PCA in R (correlation, loadings, standardizing, variance explained). You can run R and read its output. No linear algebra is assumed; every term is defined as it appears.
Two green blocks, and cold blue-white everywhere else. That two-block shape is the fingerprint we are about to explain.
The clue is in the correlations
Let us make Priya's data concrete so you can compute on it. Each lesson runs in a fresh R session, so we build the marks right here (run this once). Two hidden abilities, one number per student, are turned into six subject scores, each with its own random noise. You never see the two abilities; you only see the six columns they produce.
Now look at how the six columns move together:
Inside the English block, correlations sit around 0.5. Inside the maths block, around 0.6. Across the two blocks, they collapse to near zero. Six columns, but really only two "clumps" of shared movement.