Hello,
I am trying to conduct a path analysis on a parallel, serially mediated model (as pictured below) using multilevel data (individuals organized into teams). I have been receiving errors when trying to run the analysis and I am hoping someone may be able to help me figure out if my code is incorrect, or if there may be another cause (e.g., my dataset not being big enough).
This data was captured in an organization where half of the teams received an intervention (the IV), and half of the teams did not. Thus, since there is no within-group variation on the IV I assume this is a level 2 (team) variable, but we are specifically interested in level 1 (individual) effects. Other than the IV, all variables were measured at the individual level. I am planning to use these variables as observed (rather than latent, composed of the specific items we used to measure the variables).
My main questions are:
- Is the code for the path analysis written correctly for estimating the effects among the variables?
- Is the code for the path analysis written correctly for capturing the multilevel effects?
Here is the model:
And here is the code I have written for the path analysis:
(Note: IV = independent variable, M1 = mediator 1, M2a = mediator 2a, M2b = mediator 2b, DV1 = dependent variable 1, DV2 = dependent variable 2)
model_1 <- '
level:1
M2a ~ k*M1
M2b ~ m*M1
DV1 ~ h1*M2a + j1*M2b
DV2 ~ h2*M2a + j2*M2b
level: 2
M1 ~ a*IV
M2a ~ b1*M1 + c1*IV
M2b ~ b2*M1 + c2*IV
DV1 ~ d1*M2a + e1*M2b + f1*M1 + g1*IV
DV2 ~ d2*M2a + e2*M2b + f2*M1 + g2*IV
indirect_M2a := a*b1
indirect_M2b := a*b2
total_M2a := c1 + (a*b1)
total_M2b := c2 + (a*b2)
indirect_DV1_via_M2a := a*b1*d1
indirect_DV1_via_M2b := a*b2*e1
indirect_DV2_via_M2a := a*b1*d2
indirect_DV2_via_M2b := a*b2*e2
total_DV1 := (a*b1*d1) + (a*b2*e1) + (c1*d1) + (a*f1) + (g1)
total_DV2 := (a*b1*d2) + (a*b2*e2) + (c2*e2) + (a*f2) + (g2)
'
fit_model_1 <- sem(model = model, data = data_set, cluster = "Team_ID")
summary(fit_model_1)
Here is a visual representation of the coefficients specified in the code:
Any help that anyone can provide on this analysis would be greatly appreciated! Thank you in advance!!