Using the lavaan package (in R) for latent variable modeling (SEM)

By Dr. William Revelle, Ph.D - Northwestern University

download pdf

download pdf

This is a fantastic resource for learning to run confirmatory factor analysis (CFA) models and structural equation models (SEM) in R using the lavaan package. The tutorial provides example models, includes example code, discusses multi-group analysis, and even references some advanced functions for producing path diagrams in R. As the presentation is a few years old, there may be some places where the code is out-of-date, but updates for any obsolete code can be found in the lavaan manual. If you are using R, you are probably accustomed to these code adjustments.

This tutorial was posted with the author's permission, so thank-you to Dr. Revelle. Find more great resources from Dr. Revelle at To download a copy of R (for mac or PC) visit the CRAN project or visit my R video tutorial page to learn how to install R (on either a Mac or PC). 

Comment /Source

Jeremy J. Taylor

Stats Make Me Cry is owned and operated by Jeremy J. Taylor, Ph.D. Jeremy completed his doctoral training in Clinical Psychology at DePaul University and completed his pre-doctoral internship at the Kennedy Krieger Institute, Johns Hopkins School of Medicine. He is currently a Senior Research Associate at the Collaborative for Academic, Social, and Emotional Learning. Although Jeremy's background is in Psychology, he consulted on dissertations for more than 100 students, from 13 countries, and from a variety of disciplines.