LikeLike

]]>LikeLike

]]>LikeLike

]]>LikeLike

]]>LikeLike

]]>lavaan ERROR: unknown label(s) in variable definition(s): a1 b1 a2 a3 a4 b2 a5 a6 b6 c1 c2 c3

I’m not using R for a long time, so this could be a beginner’s question. Thank you for posting this! It is really helpful.

LikeLike

]]>

total := c + (a1 * b1) + (a1 * b1)

should be

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

If you try the proper formula the total effects are identical. The reason why it happened is that, the wrong formula was using the first mediator for both estimates. Therefore, inverting the order of the mediators yielded different estimates.

LikeLike

]]>Data <- data.frame(X = X, Y = Y, M1 = M2, M2 = M) instead of

Data <- data.frame(X = X, Y = Y, M1 = M, M2 = M2)

LikeLike

]]>