Hi,
I have a question with specifying a multilevel cross-lagged model, in which school is the second level.
Model below and structure in attachment.
No specific second level covariates are of interest so I thought to use the same model at both levels.
However I'm running into the error: lavaan WARNING: the optimizer warns that a solution has NOT been found!
So I should misspecify something.
model<-'
level:1
CD~BD+BS
CS~BD+BS
DD~CD+CS+BD+BS
DS~CD+CS+BS+BD
BS~~BD
CS~~CD
DS~~DD
level: 2
CD~BD+BS
CS~BD+BS
DD~CD+CS+BD+BS
DS~CD+CS+BS+BD
BS~~BD
CS~~CD
DS~~DD'
fit <- sem(model,cluster="SCHOOL",optim.method = "em",data=data)
Thanks in advance.
Eline