RepositoryR
ecmerkle

ecmerkle/blavaan

An R package for Bayesian structural equation modeling

106stars
26forks
2issues
1views

blavaan

R build status

blavaan is a free, open source R package for Bayesian latent variable analysis. It relies on JAGS and Stan to estimate models via MCMC.

The blavaan functions and syntax are similar to lavaan. For example, consider the Political Democracy example from Bollen (1989):

library(lavaan) # for the PoliticalDemocracy data
library(blavaan)

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 <- bsem(model, data = PoliticalDemocracy)
summary(fit)

The development version of blavaan (containing updates not yet on CRAN) can be installed via the command below. Compilation is required; this may be a problem for users who currently rely on a binary version of blavaan from CRAN. A potential alternative is to install a binary from R-universe.

remotes::install_github("ecmerkle/blavaan", INSTALL_opts = "--no-multiarch")

For further information, see:

Merkle, E. C., Fitzsimmons, E., Uanhoro, J., & Goodrich, B. (2021). Efficient Bayesian structural equation modeling in Stan. Journal of Statistical Software, 100(6), 1–22.

Merkle, E. C., & Rosseel, Y. (2018). blavaan: Bayesian structural equation models via parameter expansion. Journal of Statistical Software, 85(4), 1–30.

blavaan is supported by the Institute of Education Sciences, U.S. Department of Education, Grant R305D210044, as well as NSF grants SES-1061334 and 1460719.

Similar Projects

Discover other similar projects and AI models.

RepositoryR
yrosseel/lavaan

an R package for structural equation modeling and more

519
Nov 30, 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
stan-dev/rstan

RStan, the R interface to Stan

1.1k
Nov 23, 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