Factor Analysis in R
Jennifer Brussow
Psychometrician
summary(theory_CFA)
Parameter Estimates
Estimate Std Error z value Pr(>|z|)
lam[A1:AGE] -0.501 0.0449 -11.17 5.79e-29 A1 <--- AGE
...
lam[O1:OPE] 0.636 0.0379 16.79 2.88e-63 O1 <--- OPE
lam[O2:OPE] -0.731 0.0532 -13.75 5.39e-43 O2 <--- OPE
lam[O3:OPE] 0.809 0.0399 20.25 3.24e-91 O3 <--- OPE
lam[O4:OPE] 0.287 0.0413 6.95 3.69e-12 O4 <--- OPE
lam[O5:OPE] -0.624 0.0444 -14.06 7.07e-45 O5 <--- OPE
# The original syntax theory_syn_eq <- " AGE: A1, A2, A3, A4, A5 CON: C1, C2, C3, C4, C5 EXT: E1, E2, E3, E4, E5 NEU: N1, N2, N3, N4, N5 OPE: O1, O2, O3, O4, O5 "
# Remove the worst item/factor loadings from the syntax theory_syn_del <- " AGE: A1, A2, A3, A4, A5 CON: C1, C2, C3, C4, C5 EXT: E1, E2, E3, E4, E5 NEU: N1, N2, N3, N4, N5 OPE: O1, O2, O3, O5 "
# As before, convert your equations to sem-compatible syntax theory_syn3 <- cfa(text = theory_syn_del, reference.indicators = FALSE)
# Run a CFA with the revised syntax
theory_CFA_del <- sem(model = theory_syn3, data = bfi_CFA)
Warning messages:
1: In sem.semmod(model = theory_syn3, data = bfi_CFA) :
-170 observations removed due to missingness
2: In sem.semmod(model = theory_syn3, data = bfi_CFA) :
The following observed variables are in the input covariance
or raw-moment matrix but do not appear in the model:
O4
anova(theory_CFA, theory_CFA_del)
Error in anova.objectiveML(theory_CFA, theory_CFA_del) :
the models are fit to different moment matrices
# Compare the comparative fit indices - higher is better!
summary(theory_CFA)$CFI
0.785075
summary(theory_CFA_del)$CFI
0.7995587
# Compare the RMSEA values - lower is better!
summary(theory_CFA)$RMSEA
0.07731925 NA NA 0.90000000
summary(theory_CFA_del)$RMSEA
0.07718057 NA NA 0.90000000
More information about fit indices: http://davidakenny.net/cm/fit.htm
Factor Analysis in R