Overview and Factor Analysis
Overview and factor analysis
This block of the MV course introduces the idea of latent variables, the concept of a path diagram, on to general Structural Equation Modeling or SEM.
An overview of the next 5 weeks is here
- Factor analysis
- CFA & concepts of fit
- Path Analysis: Regression and lm as a subset of SEM
- Structural Equation Modelling
- Latent variable modeling
- Causality?
Tutorial: We begin this week by learning how to do a factor analysis in R.
Show how the EFA needs to fix latent variances at 1 and covariances at 0, and fix the upper right triangle of whatever matrix contains the latent loadings.
Show what rotation does (R is great for that - just pull the loadings matrix and throw in at promax() or varimax().
Introduce indeterminacy by talking about how the rotations do not differ in fit.
Keeping it real with example data
# install.packages("psych")
library("psych")
data(bfi)
data(bfi.dictionary)
str(bfi)
data(iqitems)
How many factors?
Horn’s Parallel analysis
- http://stats.stackexchange.com/questions/97802/how-to-correctly-interpret-a-parallel-analysis-in-exploratory-factor-analysis
Scree plot
Rotation
Oblique and Orthogonal equivalent rotated solutions.
Scores: Why scores are not just data %*% loadings
Can we construct scores on our factors? yes
An intuition might be: Factors = data matrix * Loadings matrix.
- Thomson Regression method restriction that the scores are uncorrelated, centered around 0 and with variance = 1.
- ‘scale(m1) %% solve(cor(m1)) %% loadings(fa)’
- Bartlett’s method
- ML
v1 <- c(1,1,1,1,1,1,1,1,1,1,3,3,3,3,3,4,5,6)
v2 <- c(1,2,1,1,1,1,2,1,2,1,3,4,3,3,3,4,6,5)
v3 <- c(3,3,3,3,3,1,1,1,1,1,1,1,1,1,1,5,4,6)
v4 <- c(3,3,4,3,3,1,1,2,1,1,1,1,2,1,1,5,6,4)
v5 <- c(1,1,1,1,1,3,3,3,3,3,1,1,1,1,1,6,4,5)
v6 <- c(1,1,1,2,1,3,3,3,4,3,1,1,1,2,1,6,5,4)
m1 <- cbind(v1,v2,v3,v4,v5,v6)
fa <- factanal(m1, factors = 3,scores = "regression")
fa$scores # the correct solution
fac <- m1 %*% loadings(fa) # the answer on your question
> round(cor(fac),2)
Factor1 Factor2 Factor3
Factor1 1.00 0.79 0.81
Factor2 0.79 1.00 0.82
Factor3 0.81 0.82 1.00
> round(cor(fac2),2)
Factor1 Factor2 Factor3
Factor1 1 0 0
Factor2 0 1 0
Factor3 0 0 1
Next week: We will convert this model to CFA.
Refs
- http://www.psy.ed.ac.uk/people/iand/Bartholomew%20%282009%29%20Br%20J%20Math%20Stat%20Psychol%20factor%20scores%20Thomson%20Spearman%20Bartlett.pdf