# Testing mediation and moderation; can one variable function as both mediator and moderator?

I am trying to understand the relationship between three variables, namely dependent, independent and a third variable I have some theoretical evidence that the third variable has mediation or moderation effect on the dependent variable. How can I test this relation? Also, is it possible that a variable functions as both mediator and moderator variable at the same time?

From definitions, I feel that a variable can not simultaneously function as mediator and moderator. Let's try to investigate both effects:

Mediaiton
Mediation is a hypothesized causal chain in which one variable affects a second variable that, in turn, affects a third variable. The intervening variable, $M$, is the mediator. It mediates the relationship between a predictor, $X$, and an outcome, $Y$. Graphically, mediation can be depicted in the following way: $$X \longrightarrow M \longrightarrow Y$$ Testing mediation

1. Inspect if $Y$ is influenced by $X$ with $\hat y = \beta_0 + \beta_1x$
2. See if $M$ is influenced by $X$ with $\hat m = \beta_0 + \beta_1x$
3. See if $Y$ is influenced by $M$ with $\hat y = \beta_0 + \beta_1m$

If one or more of these relationships are nonsignificant, researchers usually conclude that mediation is not possible or likely. Assuming the above steps yield significant results,

1. Conduct a multiple regression to see the influence of $X$ and $M$ on $Y$ with $\hat y = \beta_0 + \beta_1x + \beta_1m$

If $X$ is no longer significant when $M$ is controlled, the finding supports full mediation. If X is significant, i.e., both $X$ and $M$ both significantly predict $Y$, the finding indicates partial mediation.

Testing moderation
Let's assume a student's GPA (outcome variable) is affected not only by study-time (independent variable), but also by gender (moderating variable). In order to test moderation effect of gender, add to regression equation the interaction term between study-time and gender. $$GPA = \beta_0 + \beta_1x_{studytime} + \beta_2x_{gender} + \beta_3x_{studytime}x_{gender}$$ If $\beta_3$ is significant, there exists moderation.

• If the mediation is weak (partial mediation), can the variable act as a moderator as well? – Smith Jun 11 '16 at 13:39
• No, mediation and moderation are different concepts. Moderation makes the relationship stronger or weaker. There might be relationship between dependent and independent variables even in the absence of moderator variable. In case of mediation, the presence of mediator is a must. The mediator is first influenced by dependent variable which, in turn, affects independent variable. Pay attention to the mediation definition at the beginning. – rsl Jun 11 '16 at 14:06

Here is an article giving an example of a moderating mediator.

https://www.sciencedirect.com/science/article/abs/pii/S0005789417301144

This explains how a mediator may later become a moderator, however I would speculate that under most circumstances (particularly in biopsychology) mediation tests are detecting only statistical mediation, and in such case “full mediation” can not be truly observed unless all other potential mediators are controlled for in analysis (as well as other necessary conditions, such as random assignment to experimental condition and a longitudinal design); that being said a mechanism that partially explains an association between the independent and dependent variables may also moderate some path (a2 or b2) of a second mediator.

For example the relation between poverty and poor health may be mediated (partially) by substance use, and partially by social support network size; however it’s also possible that the effect of poverty on substance abuse (a1 path) may be moderated by social support (i.e., people in poverty may only be more likely to engage in substance abuse if they don’t have a quality social network).

For more current methodology for mediation analysis please see Andrew Hayes.