LikeLike

]]>LikeLike

]]>I do not have experience with fitting ordered categorical variables in lavaan, my experience with lmer and glm says that they give an error if things do not make sense. I am not sure I am allowed to infer that everything is working fine if you did not get an error when you fitted your model, maybe asking to the lavaan google group whether lavaan handles ordered categorical response terms will provide you a better answer than mine.

On the other hand, note that there is a bunch of people arguing that mediation does not require a significant total effect of X on Y (a list of references can be found in the Preacher and Hayes’ paper I cite above). Good luck!

LikeLike

]]>I have a dependent variable, Y, which is specified as an ordinal categorical variable (with 6 levels, where 1 < 2 < 3 < 4 < 5 < 6). I have my predictor, X, and also 2 mediators (M1 and M2, where M1 ~~ M2), and 3 other 'control' variables (specified as B, C and D, respectively). So my mediation model looks like this:

mediation.model.3<- '

Y ~ b1*M1 + b2*M2 + c1*X + c2*B + c3*C + c4*D

M1 ~ a1*X + a3*B + a5*C + a6*D

M2 ~ a2*X + a4*B + a7*C + a8*D

direct := c1

indirect1 := a1*b1

indirect2 := a2*b2

total := c1 + (a1*b1) + (a2*b2)

M1 ~~ M2 '

The thing I am confused about is that my predictor variable X has a large 'significant' beta coefficient when I run the full model using clm (r package: ordinal) – but when I look to see if X is mediated by M1 or M2 in package lavaan, the effect of X itself is no longer significant (i.e. the CI associated with the total effect include zero).

I'm wondering if I am violating the assumptions of lavaan by fitting an ordered categorical response term as the DV (Y). Do you know? Thank you!

LikeLike

]]># DIRECT EFFECT

Y ~ b1*M + c1*X + c2*gender + c3*race + c4*SES

# mediator

M ~ a1*X + a2*gender + a3*race + a4*SES

# INDIRECT EFFECT (a*b)

ab := a1*b1

# TOTAL EFFECT

total1 := c1 + (a1 * b1)

total2 := c2 + (a2 * b1)

total3 := c3 + (a3 * b1)

total4 := c4 + (a4 * b1)

If you have semPlot installed try to plot the fit that you get from the sem() function to see determine whether you successfully represented all the path that you wanted to include in your analysis.

LikeLike

]]>Thank you so much for this helpful post!

So how would control variables fit into this? I have been trying to add 3 controls to all legs of the mediation, but I am wondering how to address the indirect effect. Here is what I have:

model4 <- ' # DIRECT EFFECT

Y ~ c*X

# mediator

M ~ a1*X + a2*gender + a3*race + a4*SES

Y ~ b1*M + b2*gender + b3*race + b4*SES

# INDIRECT EFFECT (a*b)

ab := a1*b1

# TOTAL EFFECT

total := c + ((b1+b2+b3+b4)*(a1+a2+a3+a4))

'

emoabu.ind4 <- sem(model.emoabu4, data = SPIN, se = "bootstrap")

summary(emoabu.ind4)

Do I need to have multiple lines for the indirect and total effects?

Thank you so much!

LikeLike

]]>LikeLike

]]>LikeLike

]]>