Leanpub Header

Skip to main content

Longitudinal Structural Equation Modelling

Model Stability, Causal Direction, and Individual Change in Panel Data Using R

The instructor has published 100% of this course.Last updated on 2026-11-23

Use panel data to study stability, causal direction, and individual change with structural equation models in R. In this course, you will learn how to estimate autoregressive, cross-lagged, random-intercept cross-lagged, and latent growth models with lavaan, test hypotheses by comparing models, and model non-linear change. You will finish with a clear, reproducible workflow for longitudinal SEM that you can apply to your own panel data.

Minimum price

$300

$300

You pay

Author earns

$

Also available for 2 course credits with a Learner Membership

PDF
EPUB
WEB
About

About

About the Course

Longitudinal data, or data collected multiple times from the same cases, let us see how people change over time and allow us to better understand causal relationships. Using this information requires flexible models that can account for its complexity. Structural equation modeling (SEM) is a framework that helps researchers understand change and multiple relationships at the same time. It estimates several regressions at once, can include latent variables and random effects, and makes it easy to test complex hypotheses.

This course will teach you how to use SEM to analyze longitudinal data in R using the lavaan package. We start with path analysis and simple models of stability. We then move on to cross-lagged panel models for questions about causal direction. Finally, we use latent growth models to estimate individual trajectories and explain how people change.

What You Will Learn

Path analysis, SEM and simple models of change

Structural equation models build on regression, so the course starts by estimating several regression equations at once.

In this section, you will learn:

  • How path analysis splits an effect into direct, indirect, and total effects
  • How SEM extends simple regression models through latent variables
  • How to compare competing models
  • How to model stability between two waves and interpret the stability coefficient

Cross-lagged panel models

Many research questions are about which variable comes first, for example, whether poor physical health lowers mental health or the other way around.

In this section, you will learn how to:

  • Specify a cross-lagged panel model with stability coefficients, cross-lagged effects and within-wave correlations
  • Test the causal direction by constraining the two cross-lagged effects
  • Test hypotheses about changes in stability, stationarity and equilibrium
  • Control for time-constant and time-varying confounders
  • Separate within-person and between-person variation with random intercepts (the random-intercept cross-lagged panel model)
  • Estimate longitudinal mediation models that control for earlier values of the mediator and the outcome

We also discuss the main limitations of the cross-lagged model, so you can interpret its results with care.

The latent growth model

Latent growth models describe how each individual changes in time and what explains differences in that change.

In this section, you will learn:

  • How the latent growth model relates to the multilevel model for change
  • How to estimate latent growth models in R with the growth() command
  • How to interpret the average trajectory, the differences between individuals, and the correlation between the intercept and the slope
  • How to explain the starting level and the rate of change with time-constant predictors
  • When to use the latent growth model and when to use the multilevel model for change

Flexible latent growth models

Change in time does not always follow a straight line, and many panel studies have missing or unequally spaced waves.

In this section, you will learn how to:

  • Include time-varying covariates in a latent growth model
  • Estimate parallel process models for two outcomes that change together
  • Deal with missing waves and unequal gaps between waves
  • Model non-linear change using quadratic growth and freely estimated loadings
  • Build a sequence of models, from a linear trajectory to other shapes of change and then predictors

Learn by doing with real longitudinal data

The course combines videos, written explanations, quizzes, and hands-on practical exercises so you learn by applying each model to data. Each lesson includes videos and accompanying slides. You will also gain access to a forum to ask questions related to the topics covered in the course.

There is a practical at the end of each module. The practicals use a synthetic version of Understanding Society (UKHLS), one of the largest longitudinal household surveys in the world. This provides an opportunity to implement what you have learned to help you transfer this to your own research.

Each practical includes:

  • Guided exercises
  • Full solution code and answers to all questions and tasks
  • Detailed walkthrough videos

You will finish the course with R code for each type of model that you can adapt to your own panel data.

Who this course is for

This course is designed for researchers who want to analyze longitudinal and panel data with structural equation models in R, including:

  • PhD students working with panel or cohort data
  • Social scientists who want to study causal direction and change with survey data
  • Health and behavioral researchers working with repeated measures
  • Researchers who know regression and want to move on to longitudinal SEM

Prerequisites

You should already be comfortable with:

  • Basic R syntax
  • Working with data frames and basic data manipulation
  • Linear regression

No previous knowledge of SEM or lavaan is needed, as the first module introduces both.

If you are new to R, consider taking the course Introduction to R for Social Researchers, which provides the foundations needed to follow the code taught here.

The practicals start from a cleaned dataset, so you do not need to prepare the data yourself. If you want to learn how to clean, merge, and reshape panel data before modeling it, the course Master Longitudinal Data Wrangling using R covers these steps.

For a longer introduction to path analysis and mediation with lavaan, see the course Mediation and Moderation Analysis using R. Taking it first is optional.

What you will be able to do after this course

After completing the course, you will be able to:

  • Specify and estimate path models, autoregressive models, and cross-lagged panel models in lavaan
  • Test hypotheses about stability and causal direction by comparing nested models
  • Use random intercepts to estimate within-person effects in a cross-lagged model
  • Estimate longitudinal mediation models
  • Fit and interpret latent growth models with time-constant and time-varying predictors
  • Model parallel processes, non-linear change, and missing waves

Most importantly, you will be able to choose the longitudinal SEM that fits your research question and explain what its coefficients say about stability and change.

 

 

Share this course

Instructor

About the Instructor

Alexandru Cernat

Alexandru Cernat is a professor in Methodology and Social Data Science at the University of Manchester.

He has a PhD in survey methodology from the University of Essex and was a post-doc at the National Centre for Research Methods and the Cathie Marsh Institute.

His research and teaching focus on: survey methodology, longitudinal data, measurement error, latent variable modelling, new forms of data and missing data.

He is also the founder of longitudinalanalysis.com, a platform that helps researchers and analysts learn to collect, clean, and analyse longitudinal data.

You can find out more about him and his research at: alexcernat.com.

The Leanpub Podcast

Episode 267

An Interview with Alexandru Cernat

Material

Course Material

  • Path analysis, SEM and simple models of change

  • Causal questions and path analysis

  • SEM estimation and model fit

  • Simple models of change

  • The autoregressive model

  • Testing hypotheses in lavaan

  • Quiz

  • Quiz 1

    100 attempts allowed

  • Practical

  • Solution

  • Cross-lagged panel models

  • The cross-lagged panel model

  • Extensions and limitations of the cross-lagged model

  • Confounders and the random-intercept cross-lagged model

  • Longitudinal mediation

  • Quiz

  • Quiz 2

    100 attempts allowed

  • Practical

  • Solution

  • The latent growth model

  • Introducing the latent growth model

  • The latent growth model in R

  • Time-constant predictors

  • Strengths of MLM and LGM

  • Quiz

  • Quiz 3

    100 attempts allowed

  • Practical

  • Solution

  • Flexible latent growth models

  • Time-varying covariates and parallel processes

  • Treating time flexibly: intercept and missing waves

  • Non-linear change: polynomials and free loadings

  • Quiz

  • Quiz 4

    100 attempts allowed

  • Practical

  • Solution

  • Further reading

  • Course forum

  • Make the course better

  • References

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub