I have a question regarding mediation analysis. Suppose X represents the treatment variable, Y represents the outcome variable, and M represents the mediator. When I run the following regression model:


The coefficient of X is not significant. However, when I add the mediator into the regression model:


The coefficient of X becomes significant. In this situation, what can we conclude? Can we say X has no significant treatment effect on Y? What is the possible reason of this result?

  • $\begingroup$ More information is needed to adequately answer your question. Because you are calling this a mediator, I assume that it is measured post-treatment assignment and it can be influenced by treatment assignment. If these assumptions are correct, then including it in the model biases the treatment effect. See cpb-us-e1.wpmucdn.com/sites.dartmouth.edu/dist/5/2293/files/… for a discussion of this. $\endgroup$
    – dbwilson
    Commented Aug 10, 2021 at 15:46

1 Answer 1


The coefficient on X in Y ~ X is the total effect of X on Y. The coefficient on X in Y ~ M + X is the direct effect of X on Y. The total effect is the sum of the direct and indirect effects, where the indirect effect is the effect of X on Y through M.

In your situation, there is no total effect of X on Y, but there is a direct effect on X on Y. This can occur when there are two opposing causal pathways from X to Y. For example, it has been observed that wearing a helmet does little to prevent injury to cyclists (i.e., the total effect of wearing a helmet on injury is zero). This could be explained by the fact that helmets encourage riskier behavior by cyclists (i.e., because they feel safer), thereby increasing the risk of injury, while the helmets themselves provide safety to the cyclists, decreasing the risk of injury. The indirect effect (the effect through risky behavior) and the direct effect (the effect due to the safety provided by the helmets) are in opposite directions, yielding a total effect of zero, even though there is a nonzero direct effect.

Of course, what you observed has occurred in a sample, and so failing to find a significant effect doesn't mean there is no effect. It just means you might not have the precision to detect it. Direct effects can often be estimated with much more precision that total effects, so it could just be that your estimate of the total effect isn't precise even though a total effect is present.

  • $\begingroup$ Thanks a lot for your answer! Now I can understand the rationale behind this phenomenon. $\endgroup$
    – Hongfei Li
    Commented Aug 12, 2021 at 5:31
  • $\begingroup$ May I ask how to estimate the indirect effect using a regression form? Can I use the coefficient of X in Y~X minus the coefficient of X in Y~M+X to get the point estimation of the indirect effect? How can I get the standard error of it? Thanks! $\endgroup$
    – Hongfei Li
    Commented Aug 12, 2021 at 5:37
  • $\begingroup$ There are a variety of methods, but the most common way is to multiply the coefficient on X in M ~ X by the coefficient on M in Y ~ M + X and bootstrap the standard error. Mediation is an advanced statistical technique, and you should read a modern (NOT Baron & Kenny) resource on how to perform it rather than try based on the method I describe here. $\endgroup$
    – Noah
    Commented Aug 12, 2021 at 14:57
  • $\begingroup$ Thanks for the detailed interpretation! I am trying to study Hayes' book and PROCESS. $\endgroup$
    – Hongfei Li
    Commented Aug 16, 2021 at 9:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.