Confirmatory Factor Analysis with R

“A Introductorial Tutorial using lavaan, sem, and OpenMx

Author

Bruce Dudek

Published

June 25, 2025

Preface

Although the specific target audience for this tutorial is graduate students in statistics classes at the University at Albany, the document can be of general help to other students and researchers looking to implement confirmatory factor analysis with R.

The data set and the models evaluated are those used by James Boswell in his APSY613 Multivariate Analysis class in the Psychology Department at the University at Albany. The data set is the WISC-R data set that the multivariate statistics textbook by the Tabachnick textbook (Tabachnick, Fidell, & Ullman, 2019) employs for confirmatory factor analysis illustration. The goal of this document is to outline rudiments of Confirmatory Factor Analysis strategies implemented with three different packages in R. The illustrations here attempt to match the approach taken by Boswell with SAS. The document is targeted to UAlbany graduate students who have already had instruction in R in their introductory statistics courses.

This book/monograph uses the Quarto markup language (Allaire & Dervieux, 2024) with R (R Core Team, 2018), and extensively uses rmarkdown (Allaire et al., 2018) and knitr (Xie, 2015). RStudio (RStudio Team, 2015) was used for all writing and programming.