# moderated mediation vs mediated moderation

I am looking for a detailed explanation of moderated mediation and mediated moderation. My basic understanding is that in moderated mediation, we have a classical mediation model with the addition of the moderator (which I believe is just an interaction but I am not sure) that influences the association between the mediator and the outcome variable. So, I thought a causal diagram/DAG would look something like this:

X --> M --> Y
|
W


where M is the mediator and W is the moderator.

On the other hand, in mediated moderation we have an interaction between an independent variable and the outcome variable, which influences the mediator and the corresponding digram might look something like this:

X * W --> M --> Y


I would like a more detailed explanation of these concepts ideally with diagrams and an example (with code in R or python ideally).

• It's clearer to write a moderator as the moderator affects the relationship. So in the first one, W should point to one of the other arrows. In the second, W could point to the first arrow (or the second one). Commented Mar 20 at 22:10
• You're asking a big question, so I don't think you should necessarily expect an answer. The book Introduction to Mediation, Moderation, and Conditional Process Analysis: A Regression-Based Approach by Hayes might help you. Commented Mar 20 at 22:11
• @JeremyMiles Thanks for the reference. I was not aware of that one :) Commented Mar 23 at 14:14

• "mediated moderation" implies that the question is about whether a moderator's effect (i.e., the slope of the X $$\times$$ W product term) is mediated (i.e., X $$\times$$ W product term affects M, which then affects Y). So the parameter of interest is the indirect effect of X $$\times$$ W on Y via M.
Both diagrams are wrong because arrows don't point to arrows in linear models (that is a useful way to communicate the concept that a parameter depends on a moderator, but it does not map onto the estimable path model). The Preacher et al. (2007) I linked to above provides the correct path diagrams, which include the product term(s). I have some lavaan code showing how to fit a couple of those models in the OSF appendix for this paper about power analysis.