RepositoryRBEBelgium
yrosseel

yrosseel/lavaan

an R package for structural equation modeling and more

519stars
125forks
5issues
3views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: structural-equation-modeling

#1 Repository of the week

1
TINIX TRENDING·Topic: statistical-modeling

#1 Repository of the week

1
TINIX TRENDING·Topic: latent-variables

#1 Repository of the week

lavaan

lavaan is a free, open source R package for latent variable analysis. You can use lavaan to estimate a large variety of multivariate statistical models, including path analysis, confirmatory factor analysis, structural equation modeling and growth curve models.

The lavaan package is developed to provide useRs, researchers and teachers a free open-source, but commercial-quality package for latent variable modeling. The long-term goal of lavaan is to implement all the state-of-the-art capabilities that are currently available in commercial packages. However, lavaan is still under development, and much work still needs to be done.

Job ad

As part of an NWO-funded project for Dutch open-science infrastructural development, we are looking for a (second) researcher/junior postdoc for the lavaan project project. The job ad can be found on the University of Twente.

The deadline is 31 July 2026.

The proposal for the full project can be found on Zenodo. The post-doc position above is part of Work Package 1 (WP1).

Installation

Install the stable version from CRAN:

install.packages("lavaan")

Or the development version from GitHub:

# install.packages("remotes")
remotes::install_github("yrosseel/lavaan")

Usage

To get a first impression of how lavaan works in practice, consider the following example of a SEM model (the Political Democracy Example from Bollen's 1989 book):

library(lavaan)

model <- '
   # latent variable definitions
     ind60 =~ x1 + x2 + x3
     dem60 =~ y1 + y2 + y3 + y4
     dem65 =~ y5 + y6 + y7 + y8
   # regressions
     dem60 ~ ind60
     dem65 ~ ind60 + dem60
   # residual covariances
     y1 ~~ y5
     y2 ~~ y4 + y6
     y3 ~~ y7
     y4 ~~ y8
     y6 ~~ y8
'
fit <- sem(model, data = PoliticalDemocracy)
summary(fit)

More information can be found on the website: https://lavaan.org

Similar Projects

Discover other similar projects and AI models.

RepositoryR
ecmerkle/blavaan

An R package for Bayesian structural equation modeling

106
Nov 18, 2026
RepositoryR
wjschne/ggdiagram

Object-oriented diagram plots with ggplot2

58
Nov 23, 2026
RepositoryR
OpenMx/OpenMx

Repository for the OpenMx Structural Equation Modeling package

102
Nov 15, 2026
RepositoryPython
realrate/Causing

Causing: CAUsal INterpretation using Graphs

63
Nov 14, 2026
Modelsentence-similarity
sentence-transformers/all-MiniLM-L6-v2

all-MiniLM-L6-v2 This is a sentence-transformers(https://www.SBERT.net) model: It maps sentences & paragraphs to a 384 dimensional dense vector space and can be used for tasks like clustering or semantic search. Usage (Sentence-Transformers) Using t...

♥0
157.6M
Jun 1, 2026
RepositoryR
paul-buerkner/brms

brms R package for Bayesian generalized multivariate non-linear multilevel models using Stan

1.4k
Nov 27, 2026
RepositoryR
amices/mice

Multivariate Imputation by Chained Equations

522
Nov 27, 2026
RepositoryR
wviechtb/metafor

A meta-analysis package for R

322
Nov 9, 2026
RepositoryR
m-clark/Miscellaneous-R-Code

Code that might be useful to others for learning/demonstration purposes, specifically along the lines of modeling and various algorithms. **Superseded by the models-by-example repo**.

197
Nov 25, 2020