A tutorial for understanding SEM using R: Where do all the numbers come from?
Structural equation modeling (SEM) is often seen as a complex and difficult method, especially for those who want to understand how the numbers in SEM software output are actually computed. Although many open-source SEM tools are now available-especially in the R programming environment-looking into their source code to understand the underlying calculations can still be overwhelming. This tutorial aims to provide a clear and accessible introduction to the basic computations behind standard SEM analyses. Using two well-known example datasets, we show how to manually reproduce key results such as parameter estimates, standard errors, and fit measures using simple R scripts. The focus is on clarity and understanding rather than speed or efficiency. We hope that by following this tutorial, readers will gain a better grasp of how SEM works "under the hood," and be able to apply similar ideas in their own research.
Authors
- Yves Rosseel (ORCID: https://orcid.org/0000-0002-4129-4477)
- Marc Vidal (ORCID: https://orcid.org/0000-0002-1084-3242)
Institutions
- HOGENT University of Applied Sciences and Arts (BE)
- Ghent University Hospital (BE)
- Ghent University (BE)
- Max Planck Institute for Human Cognitive and Brain Sciences (DE)
Publication Details
- Journal
- British Journal of Mathematical and Statistical Psychology
- Published
- 2025-07-13
- DOI
- https://doi.org/10.1111/bmsp.70003
- Primary Topic
- Statistical Methods and Bayesian Inference
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- Fonds Wetenschappelijk Onderzoek