I am trying to run a SEM to determine the model fit for my model, which has 11 IVs (IV1 – IV11), 2 parallel mediators (M1 and M2), and one outcome (Y). When I run the model, I get the following error “The Optimizer warns that a solution has not been found”.
What can I do to overcome this error? I would appreciate all the help possible, thank you!
This is my model
med1 <- "IV1 =~ A1 + A2 + A3 + A4 + A5 + A6
IV2 =~ B1 + B2 + B3 + B4 + B5
IV3 =~ C1 + C2 + C3 + C4
IV4 =~ D1 + D2 + D3 + D4 + D5 + D6
IV5 =~ E1 + E2 + E3
IV6 =~ F1 + F2
IV7 =~ G1 + G2 + G3 + G4 + G5 + G6 + G7
IV8 =~ H1 + H2 + H3 + H4
IV9 =~ I1 + I2 + I3
IV10 =~ J1 + J2
IV11 =~ K1 + K2 + K3 + K4
M1 =~ ME1 + ME2 + ME3
M2 =~ MED1 + MED2 + MED3
#M1 and M2 are mediators
#DV is Y1
Y1~e1*IV1 + e2*IV2 + e3*IV3 + e4*IV4 + e5*IV5 + e6*IV6 + e7*IV7 + e8*IV8 + e9*IV9 + e10*IV10 + e11*IV11 + b*M1 + d*M2
M1~a1*IV1+a2*IV2+a3*IV3+a4*IV4+ a5*IV5+a6*IV6+a7*IV7+a8*IV8+a9*IV9+a10*IV10+a11*IV11
M2~c1*IV1+c2*IV2+c3*IV3+c4*IV4+c5*IV5+c6*IV6+c7*IV7+c8*IV8+c9*IV9+c10*IV10+c11*IV11
#indirect effect (a*b)
a1b := a1*b
a2b := a2*b
a3b := a3*b
a4b := a4*b
a5b := a5*b
a6b := a6*b
a7b := a7*b
a8b := a8*b
a9b := a9*b
a10b := a10*b
a11b := a11*b
#indirect effect (c*d)
c1d := c1*d
c2d := c2*d
c3d := c3*d
c4d := c4*d
c5d := c5*d
c6d := c6*d
c7d := c7*d
c8d := c8*d
c9d :=c9*d
c10d := c10*d
c11d := c11*d
#total effect
total1 := e1 + (a1*b) + (c1*d)
total2 := e2 + (a2*b) + (c2*d)
total3 := e3 + (a3*b) + (c3*d)
total4 := e4 + (a4*b) + (c4*d)
total5 := e5 + (a5*b) + (c5*d)
total6 := e6 + (a6*b) + (c6*d)
total7 := e7 + (a7*b) + (c7*d)
total8 := e8 + (a8*b) + (c8*d)
total9 := e9 + (a9*b) + (c9*d)
total10 := e10 + (a10*b) + (c10*d)
total11 := e11 + (a11*b) + (c11*d)"
fitmed1 <- sem(model=med1, data=df2, ordered=c("A1", "A2", "A3", "A4", "A5","A6", "B1", "B2", "B3", "B4", "B5", "C1", "C2", "C3", "C4", "D1","D2", "D3", "D4", "D5", "D6", "E1", "E2", "E3", "F1", "F2", "G1", "G2", "G3", "G4", "G5", "G6", "G7", "H1", "H2", "H3", "H4", "I1", "I2", "I3", "J1", "J2", "K1", "K2", "K3", "K4", "ME1", "ME2", "ME3", "MED1", "MED2", "MED3", "Y1", estimator="WLSMV")
lee18 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.