-
Hi there! Thank you for creating such a useful tool! I have a question regarding the capabilities of the package: Is it possible to perform moderated mediation using this package? We attempted to define the moderated mediation using a1 * X:W and then multiply it by one of the indirect effects, but encountered an issue since it involves a three-way interaction. Could you please advise on how to implement this in the package? Victor |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Hey Victor, I don't see why this would create a three-way interaction, can I perhaps see the code you tried to run? Kjell |
Beta Was this translation helpful? Give feedback.
-
Thank you! model1 <- " X =~ x1 + x2 + x3 M ~ X+Z+a1 * X:Z medmod=: a1*b2 " In this case, mediated moderation cannot be calculated because lavaan doesn't recognize the "a1*X:Z Thanks again! |
Beta Was this translation helpful? Give feedback.
Assuming you've added m1-3, the problem here should be that the ':=' operator hasn't been implemented for the lms/qml approach yet . It is basically just a post-estimation procedure, which you could calculate by hand after estimating the model. We're working on getting this to work with the
rmedsem
package. Have you tried using any of the other approaches?