Concept map / Factor analysis
Share
Factor analysis and item correlations
Change factor loadings and factor correlations to see the correlation matrix implied by the model.
1Six school tests and the factors behind them
Scores in vocabulary, reading, spelling, arithmetic, algebra and geometry tend to rise and fall together. A factor is an unobserved variable that accounts for that shared variation, and a loading is the coefficient that links a score to its factor.
Here each test loads on one factor, every variable is standardized, and the residuals are uncorrelated. Move the loadings and watch the correlation matrix the model implies. Then simulate people and see how closely a sample reproduces it.
Pick two tests here, in the diagram or in the matrix.
Vocab loads 0.80 and Reading loads 0.70 on the same factor. That factor is the only thing they share, so the model implies a correlation of 0.80 × 0.70 = 0.56. The factor explains 64% of the variance in Vocab and 49% in Reading; the rest is unique to each test.
More controls
Pressing a sample size again draws a fresh sample of that size.
2A good item and a mediocre one on the same factor
Two items measure the same factor and nothing else connects them. Item A is a good item, with a loading of 0.80. Item B is a mediocre one, with a loading of 0.50. What correlation between A and B does the model imply?
3Multiply along the path between two tests
Trace the path that joins two tests in the diagram and multiply the numbers along it: one loading, the factor correlation if the tests sit on different factors, and the other loading. Point at a symbol to see what it stands for.
Point at a symbol in either formula and the matching arrow or bar lights up.
Show how one test's variance splits
The variance of Vocab, set to 1, splits in two. 0.80² = 0.64 comes from the factor, its communality, and 1 − 0.64 = 0.36 belongs to the test alone, its uniqueness u.
4Check yourself
The tasks use the controls in section 1.
- Select two tests on the same factor, keep both loadings at 0.50 or above, and bring their implied correlation down to 0.30 or below.Now: Vocab and Reading (same factor): loadings 0.80 and 0.70, implied correlation 0.56
- Switch to two factors and select one test from each. Raise the two loadings and φ until the pair's implied correlation reaches 0.45.Now: One factor, so there is no pair that spans two factors
- Simulate people until every sample correlation is within 0.05 of the implied one. How many people does that take?Now: No sample yet
5Fit the one-factor model with lavaan
The code simulates 1000 people from the lab’s starting one-factor model and fits it with lavaan::cfa. The standardized loadings come back near 0.80, 0.70 and 0.60. The fitted model implies a correlation of 0.58 between Vocab and Reading, against 0.56 in the population and 0.57 in the sample.
Fit a one-factor model with lavaanShow the code
library(lavaan)
# One factor with the page's starting loadings
pop <- "g =~ 0.8*Vocab + 0.7*Reading + 0.6*Spelling +
0.8*Arith + 0.7*Algebra + 0.6*Geometry"
set.seed(1)
dat <- simulateData(pop, sample.nobs = 1000,
standardized = TRUE)
# Fit the one-factor model and read the standardized loadings
fit <- cfa("g =~ Vocab + Reading + Spelling +
Arith + Algebra + Geometry",
data = dat, std.lv = TRUE)
std <- standardizedSolution(fit)
round(std[std$op == "=~", "est.std"], 2)
# Vocab and Reading: population, fitted model and sample
round(c(population = 0.8 * 0.7,
model = lavInspect(fit, "cor.ov")[1, 2],
sample = cor(dat)[1, 2]), 2)Uses lavaan. Install once with install.packages(c("lavaan")).
What loadings say about correlations
- A factor model can reproduce a pattern of correlations. The correlations alone cannot show that the factor causes the scores.
- With one factor per test and everything standardized, a loading is the test’s correlation with its factor. Its square, the communality, is the share of the test’s variance the factor explains.
- Two tests on the same factor have an implied correlation equal to the product of their loadings. Loadings of 0.80 and 0.50 give 0.40, lower than either.
- For two tests on different factors, multiply both loadings by the factor correlation φ.
- Sample correlations wander. With 100 people the largest gap from the implied matrix is typically about 0.14, so compare against the model before reading meaning into one cell. Multidimensional IRT carries these ideas over to right-or-wrong item responses.
Recommended reading
- Confirmatory Factor Analysis for Applied ResearchTimothy A. Brown2nd ed., chapters 1–3, exploratory versus confirmatory analysis and the confirmatory factor model