Greetings-
I am trying to fit a two level 2-2-1 mediation in which data are missing in the mediator and the outcome. For example:
m221 <- '
level:1
outcome ~ 1
level:2
outcome ~ b*mediator + c*treatment
mediator ~ a*treatment
indirect:= a*b
total:= indirect+c'
fit.m221 <- sem(m221, data = mydata, cluster = "ClassroomID", missing = "ml")
I'm receiving the following error, and am unsure if it is because of a problem in my dataset, or if I am hitting a bug:
"Error in utils::combn(ov.names, 2) : n < m"
Thanks in advance for any advice,
Adam