Factor Analysis and Structural Equation Modeling
At present, I use the Lavaan package to perform CFA and SEM (https://lavaan.ugent.be/tutorial/index.html). I also use semoutput to extract loadings, paths, and correlations (https://dr-jt.github.io/semoutput/).
I will not directly explain these packages, since the associated tutorials are some of the best available. Instead, I will use this space to validate these packages against LISREL results from studies that I have published. I will, however, provide my Lavaan code for anyone interested in certain techniques.
This study explored the relation between working memory capacity, sensory discrimination, and attention. I found that working memory capacity and sensory discrimination could be combined into one latent factor that was predicted by both attention control and sustained attention.
1. Full CFA
1.1 Fit Statistics
1.2 Lavaan Code
CFA1 <- ' VSWM =~ VAcircSq + VAarrows + SplitSpan
AUDdisc =~ Pitch + Loud
AC =~ AntiSacc + Flanker + Stroop
Sust =~ PVT + CRT + SART'
CFA1fit <- cfa(CFA1, data = Stabledata)
summary(CFA1fit, fit.measures = TRUE)
fitMeasures(CFA1fit)