Random slopes in multilevel models

23 views
Skip to first unread message

Steffen Nestler

unread,
Jun 14, 2026, 10:29:29 AM (3 days ago) Jun 14
to lavaan
Hi Terrence, hi Yves,

I know that it is not possible to estimate multilevel SEMs with lavaan. However, I was wondering whether there is already a supported lavaan-syntax for such a model that I can use with lavaanify and lavMatrixRepresentation? For instance, something like this 

m <- 'level: 1
fw1 =~ happy + calm
fw2 =~ active + relaxed
s | fw2 ~ fw1

         level: 2
fb1 =~ happy + calm
fb2 =~ active + relaxed
fb2 ~ fb1
        s ~~ s'

test <- lavaanify( m )
lavMatrixRepresentation( test )

where "s |" is the random slope.

Thank you!
Steffen
Reply all
Reply to author
Forward
0 new messages