Hi,
I would like to do a multilevel analysis (two level) with lavaan. On level 2 I calculate a mediation. The only level 1 variable is UZUF. I would like to know whether my code is correct.
UZUF = Students' satisfaction with the lessons (level 1)
PAallgL = positive affect teacher (level 2)
MHL_12 = activity teacher (level 2)
cd = Students class
model1 <- '
level: 1
UZUF ~~ UZUF
level: 2
PAallgL ~ a*MHL_12
UZUF ~ b*PAallgL + c*MHL_12
indirect := a*b
direct := c
total := c + (a*b)
'
fit <- sem(model1, data = data1, cluster = "cd")
summary(fit, standardized=T, fit.measures=T, rsq = T)
Thank you for your help.
Daniel
--
You received this message because you are subscribed to the Google Groups "lavaan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lavaan+un...@googlegroups.com.
To post to this group, send email to lav...@googlegroups.com.
Visit this group at https://groups.google.com/group/lavaan.
For more options, visit https://groups.google.com/d/optout.
> model1 <- '
+ level: 1
+ UZUF ~~ UZUF
+ level: 2
+ PAallgL ~ a*MHL_12
+ UZUF ~ b*PAallgL + c*MHL_12
+
+ indirect := a*b
+ direct := c
+ total := c + (a*b)
+ '
> fit <- sem(model1, data = data1, cluster = "cd")
>
> summary(fit, standardized=T, fit.measures=T, rsq = T)
I would like to know whether my code is correct.
--
You received this message because you are subscribed to a topic in the Google Groups "lavaan" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lavaan/Wmko2wbi7NQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lavaan+un...@googlegroups.com.