R lavann

lavann is a SEM fitting software.


Installation

install.package('lavaan')


Usage

"
Y =~ y1 + y2 + y3
X =~ x1 + x2 + x3
Z =~ z1 + z2 + z3
Y ~ X + Z
" |>
  sem(data = data, std.lv = TRUE) |>
  lavaanPlot(coefs = TRUE)

This displays:

lavaan estimates latent variances whereas gsem fits data to a model using maximum likelihood. While regression coefficients can be comparable, the methods are fundamentally not.


CategoryRicottone

R/Lavaan (last edited 2025-04-03 21:11:27 by DominicRicottone)