Hello everyone,
I got an error message when modeling a multilevel mediation model (a 2-2-1 model, with 900 cases at level 1 and 300 units at level 2) across three groups (repeated measure, each unit is in three groups).
The syntax is as follow:
multigroup.model<-'
group: low
level:1
DV~1
level:2
DV~b*IV+c*Med
IV~a*Med
group: moderate
level:1
DV~1
level:2
DV~b*IV+c*Med
IV~a*Med
group: high
level:1
DV~1
level:2
DV~b*IV+c*Med
IV~a*Med
#indirect and total effects
ab:=a*b
total:=ab+c'
multigroup1<-sem(multigroup.model, data=df,cluster="RankID", group = "g",
fixed.x = FALSE,std.lv = TRUE, h1 = TRUE)
Then I got this error message: "Error in if (fx.delta < tol) { : missing value where TRUE/FALSE needed".
Can anyone help check if this syntax is correct? My aim is to test and compare this 2-2-1 multilevel mediation model across three conditions of the group variable (high, moderate, low).
Also, can anyone advise how to solve this error?
Thanks a lot!
Yingjie