1 of 42

Introduction to Structural Equation Modelling

James Hall

Associate Professor of Psychology of Education

Southampton Education School, University of Southampton

​

28/7/2026

J.E.Hall@Soton.ac.uk

2 of 42

Aims

To develop understanding of:

    • What Structural Equation Modelling (SEM) is
    • How SEM relates to other statistical techniques
    • The two components of SEM (the Measurement Model & Structural Model)
      • Path Analysis -- just a Structural Model
      • Latent Variable Estimation -- when just a Measurement Model
    • How one can judge the internal validity of a SEM (via Model Fit indices)
    • How to carry out basic SEM models in the R software package
    • Where to go next for further reading on SEM

3 of 42

Content

  • Part 1: Lecture
    • Defining Structural Equation Modelling (SEM)
    • Path Analysis (‘Structural Model’)
    • Latent Variable Estimation (‘Measurement Model’)
    • Example SEM
    • Model Fit Estimation
    • Scoping topics for follow-on reading

​

  • Part 2: Workshop in R
    • Setup & Overview (load packages, explain dataset)
    • Path Analysis (fit and interpret a basic path model)
    • Latent Variable SEM (introduce latent constructs, fit full SEM)
    • Model Evaluation & Modification (check fit indices, make guided modifications)
    • Wrap-Up & Q&A

4 of 42

Part 1: An Introduction to SEM

5 of 42

Defining Structural Equation Modelling (SEM)�

  • A family of statistical modelling techniques.
  • ‘Modelling’ – Recreating a structure and/or process in the world. In this case with numeric data about that structure/process.
    1. Judge if the model is a good replica
    2. Then use a good replica to better understand the structure and/or process
  • A multivariate technique that can be viewed as extending and integrating both general linear modelling (e.g. multiple regression; ANOVA) and latent variable statistics (e.g. factor analysis; cluster analysis)
  • Theory-driven and brings close together conceptual models with corresponding empirical testing

6 of 42

Defining Structural Equation Modelling (SEM)�

  • An SEM is comprised of two parts:
    • A structural model (building on general linear modelling)
    • A measurement model (building on latent variable statistics)
  • A structural model by itself is called a Path Analysis
  • A measurement model by itself is (often) a type of Factor Analysis
  • Simple SEMs can be/are represented by diagrams.
    • These diagrams blur the lines between a conceptual model explain how concepts relate and a statistical (SEM) model that is developed in order to test that conceptual model.
    • Rectangles represent directly ‘observed’ concepts
    • Ovals represent indirectly ‘observed’/’latent’ concepts
    • Single-headed arrows represent statistical dependence
    • Double-headed arrows represent correlation/covariance
    • Advanced: Triangles are the means of variables

7 of 42

Path Analysis (‘Structural Model’)

  • We can envisage this as an extension of general linear modelling/multiple regression where we have multiple dependent variables as well as variables that are both dependent/exogenous and independent/endogenous/instrumental

In Multiple Regression/GLM:

In Path Analysis:

Family Income

Mother Qualification Level

Mother Occupation

Child math attainment at start of secondary school

Child math attainment at end of secondary school

Family Income

Mother Qualification Level

Mother Occupation

Child math attainment at start of secondary school

Child math attainment at end of secondary school

b/β

r2

r2

r2

b/β

8 of 42

Latent Variable Estimation (‘Measurement Model’)�

  • At the simplest level, we can envisage this as extension of latent variable statistics such as exploratory factor analysis &/or cluster analysis (it can get more complicated though – e.g. ‘second level latent variables’)
  • The simplest latent variable estimation/measurement model in SEM is Confirmatory Factor Analysis (CFA) – number of factors pre-specified as is their relationships with potential indictors

Exploratory Factor Analysis (EFA):

Confirmatory Factor Analysis (CFA):

Indicator 1

Indicator 2

Indicator 3

Indicator 4

Latent factor 1

Latent factor 2

Indicator 5

Indicator 6

Indicator 1

Indicator 2

Indicator 3

Indicator 4

Latent factor 1

Latent factor 2

Indicator 5

Indicator 6

λ/β

r2

λ/β

h2 (communality)

9 of 42

Example Structural Equation Model

  • Featuring both a Structural and Measurement Model
    • The “e” is a regression residual for each dependent variable (DV)
    • Note the directional arrows implementing statistical dependency
      • How much one also views these statistical dependencies as engaging with notions of conceptual causality varies across field (more common in economics)

Family Income

Mother Qualification Level

Mother Occupation

Child math attainment at start of secondary school

Child math attainment at end of secondary school

Indicator 1 (e.g. Algebra test score)

Indicator 2 (e.g. Geometry test score)

Indicator 3 (e.g. Statistics test score)

Indicator 1 (e.g. Algebra test score)

Indicator 2 (e.g. Geometry test score)

Indicator 3 (e.g. Statistics test score)

e

e

e

e

e

e

e

e

Cov / Corr(r)

10 of 42

Questions?

11 of 42

Structural Equation Model – in practice

  • The examples considered so far have been conceptual
    • This illustrates the potential for SEM diagrams to straddle conceptual framework and 1-2-1 corresponding statistical operationalisation (often overlooked when learning and using SEM)
  • In reality, SEM is about solving a series of equations
    • More complex SEMs cannot be easily shown as a diagram
    • A diagram that both illustrates the conceptual model AND a 1-2-1 corresponding statistics model is also difficult when dealing with Interactions, product terms, and hypotheses of Moderation (no single method of illustration)
  • We can only obtain as many statistical estimates as we supply values (e.g. means, variances, covariances/correlations)
    • If we ask for more estimates than the values we supply, then our SEM will not run. We say that we need our SEM to be “identifiable”.
      • “Just-identified” (exactly solvable), “Over-identified” (testable), or “Under-identified” (not solvable)
    • Strategies to make an SEM identifiable include: Including more covariates and the SEM estimating fewer regression paths and covariances

12 of 42

Example under-identification in SEM (CFA)

  • CFA with 2 indicators

​

  • What is provided (3 things):
    • 2 variances (indicator 1 and 2)
    • 1 covariance (indicator 1 with 2)
    • (Note: SEM traditionally does not ask for, or return means – it assumes all variables are mean-centred to zero)
  • What is being asked for (5 things):
    • 2 factor loadings (for indicators 1 and 2)
    • 1 latent factor variance
    • 2 residual variances (e) for X1 and X2
  • Fix by including means? Will not help, because:
    • Provide: 2 means (indicator 1 and 2)
    • Ask for: 2 intercept values (vis-à-vis regression equations) + 1 latent factor mean
  • Practically:
    • Under-identification is more of a risk with simple SEM -- SEM with fewer variables

Indicator 1

Indicator 2

Latent factor 1

e

e

13 of 42

CFA in practice & an example of a just-identified model

  • CFA with 3 indicators

​

  • What is provided (6 things):
    • 3 variances (indicator 1,2,3)
    • 3 covariances (1&2, 1&3, 2&3))
  • What is being asked for (7 things):
    • 3 factor loadings (for each indicator)
    • 1 latent factor variance
    • 3 residual variances (e; for each indicator)
  • If we set/force a factor loading (b) to be 1 then this:
    • Means we ask for 1 less thing, making the model just-identified (6 in & 6 out)
      • (Aside: total in minus total out gives us an SEM’s “degrees of freedom” (df). Zero df=just-identified)
    • Gives our latent factor a metric
      • Why? -> One unit increase in the latent factor = one unit increase in the “reference indicator” (so latent factor adopts its metric)
      • This giving of a metric is why this is so often done in larger CFAs/SEMs where identification is not an issue

Indicator 1

Indicator 2

Latent factor 1

e

e

Indicator 3

e

b=1

14 of 42

Example ‘real-world’ SEM

  • Hall, J., Sylva, K., Sammons, P., Melhuish, E., Siraj-Blatchford, I., & Taggart, B. (2013). Can preschool protect young children’s cognitive and social development? Variation by center quality and duration of attendance. School Effectiveness and School Improvement, 24(2), 155-176.

​

    • A longitudinal secondary analysis
    • Examined the psychological development of 2,862 English preschoolers

between the ages of 3 to 5 years.

    • Instances of significantly protected development were more strongly

evidenced when examining:

      • (a) cognitive rather than social development,
      • (b) child rather than family-level risks,
      • (c) the quality of the processes taking place within preschools

rather than just the structures.

    • Finally, for preschools that featured only high-quality structures, any

partial protection of development was limited to instances of longer

durations of child attendance.

​

​

  • Some take-aways:
    • SEM diagrams have limited utility to provide a full illustration of all the equations in an SEM
    • Diagrams illustrative of the SEM are acceptable as visual descriptions of analyses
    • There is no need to report SEM results via annotated SEM diagrams

15 of 42

Inconsistent & partial rules make SEM diagrams equal-parts art and science: An example

  • Illustrating concepts from a conceptual framework:

Moderation: Interaction (rarely illustrated):

​

​

​

  • Illustrating how these concepts could be statistically modelled:

Product Term / Product Term /

‘Interaction Term’ ‘Interaction Term’

16 of 42

Questions?

17 of 42

Model Fit Estimation�

  • For most SEM, it is possible to estimate how well this model represents reality
    • If we try to use our SEM and its estimated values to recreate the data we supplied it with – then how well does the estimated data match the supplied (“observed”) data?
      • (Aside: “Data” here refers to variance/covariance matrices)

​

  • Ideally: The estimated data would be a perfect match for the observed data
      • As in all statistics, perfection is impossible though
      • So how close do the estimates have to be to the observations? -> varying opinions
      • Note: “Just Identified” SEM models will return (meaingless) “perfect” fit indices.

​

18 of 42

Three Types of Fit Indices in SEM (Simplified)

  • In most SEM, fit is estimated via RMSEA and CFI. Sometimes SRMR as well and maybe TLI
    • Why? Different indices become unreliable to different features of an SEM. Therefore, we can’t rely on just one.
  • Relative fit requires an analysis comparing alternative possible statistical models
    • This was how SEM began use, but the limitations of this approach led to the types of SEM usage described in these slides

​

Fit Type

Question It Answers

Example Fit Indices

Comparison Basis

Fixed / Absolute

“Does my model reproduce the data well?”

Chi-square, RMSEA, SRMR

Your model vs. observed data (covariances)

Comparative

“Is my model better than a worst-case null model?”

CFI, TLI, NFI

Your model vs. worst-case model

Relative / Information-based

“Which model is better among alternatives?”

AIC, BIC, SABIC

Competing models (lower is better)

19 of 42

Model Fit Estimators: RMSEA, CFI, and SRMR

  • RMSEA = Root Mean Square Error of Approximation
  • CFI = Comparative Fit Index
  • SRMR = Standardized Root Mean Square Residual

Fit Index

(Aside: What It Tells You)

Cutoff Guidelines

Type

RMSEA

(How well the model approximates the population data per degree of freedom)

< 0.06 = good

0.06 – 0.08 = okay

Absolute fit (parsimony adjusted)

CFI

(How much better your model fits than a null model)

> 0.95 = good

> 0.90 = acceptable

Comparative fit

SRMR

(Average difference between observed and model-implied correlations)

< 0.08 = good

Absolute fit (residual-based)

20 of 42

SEM and sample size requirements

  • Minimum sample size?
    • Sample size in SEM depends on: model complexity, indicator quality, estimation method, and missing data.

​

  • Some classic ‘rules-of-thumb’ though:
    • 10–20 cases per estimated parameter
    • Minimum n = 200 for a typical SEM
    • Smaller models with high-quality indicators? n=100–150 may suffice
    • Complex models with latent interactions? n > 500 often needed

​

  • Practical advice from 20+ years working with SEM:
    • SEM with fewer than 100 people looks unusual -- prepare to be challenged
    • SEM with 100-300 people -- may look worrying if the SEM is not simple/basic
    • SEM with 500+ people (presuming no low n intersectional groups) -- common/expected

​

21 of 42

SEM as a family of techniques

  • Over the years, SEM has extended beyond CFA+path analysis
  • Today, SEM refers to a family of techniques – with new types of SEM, and new options, both constantly being developed
    • And being able to combine together any of these types of SEM seems to be a persistent and major goal of SEM-focused statisticians
  • The result is that SEM is an incredibly flexible/high-utility statistical approach.
  • Example types of SEM:
    • Multilevel SEM (MSEM/ML-SEM) = Multi-Level Modelling +SEM
    • Bayesian SEM
    • Growth Modelling
    • Mixture Modelling
  • Example options within SEM:
    • Multiple imputation of missing values
    • Multivariate categorical dependent variables
    • Algorithm-based suggested changes to an SEM that would yield increased model fit
  • Example SEM:
    • A Bayesian growth mixture model
      • (…and 56 papers return this term in Google Scholar as of 25/6/25… …58 in Google Scholar as of 7/7/26)

​

22 of 42

Software for SEM

  • Dedicated software:
    • AMOS (part of SPSS): Great for learners as very intuitive. SPSS is expensive to purchase -- though many organisations have a site license

​

    • R (Most often via the laavan package): Great for doing SEM. A slower learning curve and slower to implement latest SEM developments but free.

​

    • Mplus: Great for power users. Has most/all of the latest SEM developments. Very easy to use. Expensive to purchase – organisations unlikely to have a site license.

23 of 42

Suggested follow-on reading�

Tabachnick, B., & Fidell, L. (2020). Using Multivariate Statistics. (7th Edition). Pearson Education Inc.

​

Great basics textbook – lots of direct instruction on choices that can be cited in Method sections.

Kline, R. B. (2023). Principles and practice of structural equation modeling. (5th Edition). Guilford publications.

​

Great starter textbook – lots of direct instruction on concepts and on different simpler models

Byrne, B. M. (2013). Structural equation modeling with Mplus/AMOS: Basic concepts, applications, and programming. Routledge.

​

Great textbook to get you using Mplus or AMOS. No R laavan version… ☹

Continuing problems with SEM textbooks:

​

  1. Most focus too much on how to run models, not why the model makes sense/is appropriate for use in different contexts

​

  • They often skip the complex stuff, like moderation, nonlinear effects, & theory-building

​

  • They rarely connect measurement, theory, and inference in a meaningful way

​

Continuing problem this fosters: SEM often gets taught as a technical tool, not as a way to think clearly about research questions.

Lingering question: Given SEM is so widely popular – why is there still no good textbook? Is it just too difficult/impractical?

24 of 42

Questions?

​

15-minute break

25 of 42

Part 2: SEM in the R Software Package

26 of 42

Aims for this SEM (via R) workshop

  1. Load required SEM packages
  2. Load and look at some simple SEM data
  3. Fit a basic Path Model
  4. Fit a basic CFA
  5. Fit an SEM
  6. Discuss what next

27 of 42

Load required SEM packages

  • Open Rstudio
  • Open a new R Script (File > New File > R Script)
  • Save it as sem_workshop.R
    • This is your working file

​

  • Loading R SEM packages. Text to enter into Rstudio (into the “script window”):

install.packages("lavaan")

install.packages("semPlot")

library(lavaan)

library(semPlot)

  • Highlight each of those lines one at a time (from the top) and then, for each, hit the “run” button on the top right-hand side of the script window

​

28 of 42

Screenshot

  • Script Window (top-left)

​

  • Button to press to either run:
    • All script in script window
    • Just highlighted script

​

  • Console Window (bottom-left)

29 of 42

Look at simple SEM data

  • Lets now use HolzingerSwineford1939 from the lavaan package
    • (It’s a simple dataset that is widely used – allowing you to use online sources to follow-up with it[post-workshop)
    • Data from a 1939 study of cognitive abilities in 12-14 year olds in the USA (by Holzinger and Swineford)
      • n=301 children (in grades 7 and 8)
      • Measured 3 latent cognitive constructs – each with 3 observed indicators - using standardised psychological tests. Latent constructs:
        • visual perception/spatial ability (we will call VISUAL)
        • verbal comprehension/reading ability (we will call VERBAL)
        • processing speed (we will call SPEED)
  • Loading this dataset (code to enter into Rstudio):

data("HolzingerSwineford1939")

head(HolzingerSwineford1939)

summary(HolzingerSwineford1939)

30 of 42

Screenshot after running: head(HolzingerSwineford1939)

31 of 42

Screenshot after running: summary(HolzingerSwineford1939)

32 of 42

Fit a basic Path Model

  • Where an observed variable (x9) is (statistically) dependent upon 2 observed independent variables (x7 and x8)
  • Code to enter into Rstudio:

model_path <- 'x9 ~ x7 + x8'

fit_path <- sem(model_path, data = HolzingerSwineford1939)

summary(fit_path, standardized = TRUE, fit.measures = TRUE)

inspect(fit_path, "r2")

  • Important note:
    • R needs straight single quote marks ' and not curly quote marks ‘ .

33 of 42

Screenshot after running path model code

34 of 42

Looking more closely at the Path Model output

  • Maximum Likelihood estimator (X9 is continuous)
  • 3 variables
  • n=301

​

​

​

  • Model fit appears to be “perfect” – this being due to us having a “just identified” SEM and with model fit indices being meaningless for such SEM

​

​

35 of 42

Looking more closely at the Path Model output

  • Note the lack of means (default/tradition in SEM)

​

  • Estimates are b unstandardised regression coefficients

​

  • Std.all are Beta standardized regression coefficients

​

  • P(>|z|) is the typical p-value

​

  • Variances refers to the residual variance. If significant more variance in the DV could still be accounted for (in theory)

​

  • r2 is the r-squared value. Equals (1 – Std.all) for the variance of the DV.

​

  • Note: Std.lv is only for IV latent variables. It shows how much raw score increase in a DV is due to a 1 standard deviation latent IV increase

36 of 42

Fit a basic CFA model

  • Where we have one latent factor (visual) indicated by 3 (reflective) indicators (x1, x2, x3)
    • (another just-identified model)
  • Code to enter into Rstudio:

model_cfa <- 'visual =~ x1 + x2 + x3'

fit_cfa <- cfa(model_cfa, data = HolzingerSwineford1939)

summary(fit_cfa, standardized = TRUE, fit.measures = TRUE)

semPaths(fit_cfa, whatLabels = "std", edge.label.cex = 0.7)

​

37 of 42

Looking at the basic CFA output

  • Note the lack of a p-value for the reference indicator (x1) – this is expected given the fixed factor loading (to 1)

​

  • Note that semPaths is the command for calling up a SEM diagram from laavan. It’s “R package” (semPlot) is the default for digramming SEM from the R Laavan package. Remember that SEM diagrams are not mandatory and may be impractical with larger SEM models

38 of 42

Fit a SEM model

  • Where we estimate 3 latent variables (visual, text, speed; each with 3 indictors) and then make the latent variable speed (statistically) dependent upon the latent variables visual and text
  • Code to enter into Rstudio:

model_sem <- '

visual =~ x1 + x2 + x3

verbal =~ x4 + x5 + x6

speed =~ x7 + x8 + x9

speed ~ visual + verbal

'

fit_sem <- sem(model_sem, data = HolzingerSwineford1939)

summary(fit_sem, standardized = TRUE, fit.measures = TRUE)

semPaths(fit_sem, whatLabels = "std", edge.label.cex = 0.7, layout = "tree")

39 of 42

Looking at SEM output – model fit

  • Note: Chi-square is the foundational statistic for model fit. Underlies most others (not SRMR). It I s not useful though as it’s p-value is not dependable as an indictor of model fit.

​

  • Model fit indices suggest only a moderate fitting model

40 of 42

Looking at SEM output – parameter estimates

  • Some more interesting estimates:
    • X2 (spatial reasoning from a cube-based test) is not well related to its latent construct – lower Beta and r-squared values vs. other indicators.
    • Only visual perception was sig. related to processing speed not verbal comprehension.
      • Perhaps unsurprising giving speed was measured via addition, counting, and letter identification tasks?
    • Note that a covariance between visual and verbal has been automatically estimated
      • (We could force this to be zero if we wanted: visual ~~ 0*verbal)

41 of 42

Looking at SEM output – auto-generated diagram

  • Note the automatic abbreviations
  • Note the mapping of standardized estimates (but not p-values or r-squared values)
  • Note the depiction of residuals as double headed arrows on the same observed variables (rather than latent variables with “e” written inside)
  • Is this really simpler to understand than the tabulated results on the previous slide?
    • Maybe when starting out with SEM?

42 of 42

What next?

SEM is a family of statistical techniques – but also more. It is also a way to formalize and empirically/statistically test theories.

    • You’re now equipped with the basics for carrying out this formalization and empirical testing. But what next?

1. Expand your SEM toolkit:

    • Explore more complex hypotheses and research questions (mediation, moderation, complex paths)
    • Model longitudinal data (growth models, cross-lagged panels)
    • Explore multigroup SEM (testing measurement invariance)

2. Learn More R packages:

    • lavaan.survey: SEM with complex samples or weights
    • semTools: model comparisons, measurement invariance helpers
    • blavaan: Bayesian SEM
    • OpenMx, nlme, brms: other modeling options beyond lavaan

3. Recommended learning resources:

    • The lavaan Tutorial (Yves Rosseel)
    • Principles and Practice of Structural Equation Modeling (Kline)
    • Online courses: Particularly NCRM (over 1 million views of its free SEM tutorial videos)
    • Practice with datasets like HolzingerSwineford1939, PoliticalDemocracy

4. Next Steps in your own work:

    • Try rewriting a regression or path model as SEM
    • Reanalyse your own data using CFA/SEM
    • Use SEM to test theoretical models, not just data fit
    • Replicate a published model