Skip to main content
HomeR

Course

Structural Equation Modeling with lavaan in R

AdvancedSkill Level
4.8+
68 reviews
Updated 07/2022
Learn how to create and assess measurement models used to confirm the structure of a scale or questionnaire.
Start Course for Free
RProbability & Statistics4 hr14 videos45 Exercises3,750 XP10,026Statement of Accomplishment

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.

Loved by learners at thousands of companies

Group

Training 2 or more people?

Try DataCamp for Business

Course Description

When working with data, we often want to create models to predict future events, but we also want an even deeper understanding of how our data is connected or structured. In this course, you will explore the connectedness of data using using structural equation modeling (SEM) with the R programming language using the lavaan package. SEM will introduce you to latent and manifest variables and how to create measurement models, assess measurement model accuracy, and fix poor fitting models. During the course, you will explore classic SEM datasets, such as the Holzinger and Swineford (1939) and Bollen (1989) datasets. You will also work through a multi-factor model case study using the Wechsler Adult Intelligence Scale. Following this course, you will be able to dive into your data and gain a much deeper understanding of how it all fits together.

Prerequisites

Intermediate Regression in R
1

One-Factor Models

In this chapter, you will dive into creating your first structural equation model with lavaan. You will learn important terminology, how to build, and run models. You will create a one-factor model of mental test abilities using the classic Holzinger and Swineford (1939) dataset.
Start Chapter
2

Multi-Factor Models

3

Troubleshooting Model Errors and Diagrams

Structural equation models do not always run smoothly, and in this chapter, you will learn how to troubleshoot Heywood cases which are common errors. You will also learn how to diagram your model in R using the semPlot library.
Start Chapter
4

Full Example and an Extension

This chapter examines the WAIS-III IQ Scale and its structural properties. You will use your skills from the first three chapters to create various models of the WAIS-III, troubleshoot errors in those models, and create diagrams of the final model.
Start Chapter
Structural Equation Modeling with lavaan in R
Course
Complete

Earn Statement of Accomplishment

Add this credential to your LinkedIn profile, resume, or CV
Share it on social media and in your performance review
Enroll Now

Don’t just take our word for it

*4.8
from 68 reviews
85%
13%
1%
0%
0%
  • EDWIN SALIM
    2 weeks ago

  • Shudi
    2 weeks ago

  • Burcu
    4 weeks ago

  • OLATUNJI
    4 weeks ago

    Great

  • saskia
    6 weeks ago

    very helpful course and easy to follow

  • Hezekiah
    3 months ago

EDWIN SALIM

Shudi

Burcu

FAQs

What is structural equation modeling and when is it used?

SEM models relationships among observed and latent (unobserved) variables simultaneously. It is used when you want to understand the deeper structure connecting your data, not just predict outcomes.

What datasets are used in the course exercises?

You will work with the classic Holzinger and Swineford (1939) mental abilities dataset, the Bollen (1989) dataset, and the Wechsler Adult Intelligence Scale (WAIS-III) for a full case study.

What is lavaan and do I need prior experience with it?

Lavaan is an R package for fitting structural equation models. No prior experience with lavaan is needed, but you should know intermediate regression and ggplot2 in R.

Does the course teach how to fix models that produce errors?

Yes. Chapter 3 specifically covers troubleshooting Heywood cases and other common SEM errors, and you will also learn to create model diagrams using the semPlot library.

Will I learn both one-factor and multi-factor models?

Yes. You start with one-factor models in Chapter 1, then expand to multi-factor models in Chapter 2, progressively building more complex and realistic structural models.

Join over 19 million learners and start Structural Equation Modeling with lavaan in R today!

Create Your Free Account

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.

Grow your data skills with DataCamp for Mobile

Make progress on the go with our mobile courses and daily 5-minute coding challenges.