Skip to main content
Log in

The Causal Mediation Formula—A Guide to the Assessment of Pathways and Mechanisms

  • Published:
Prevention Science Aims and scope Submit manuscript

Abstract

Recent advances in causal inference have given rise to a general and easy-to-use formula for assessing the extent to which the effect of one variable on another is mediated by a third. This Mediation Formula is applicable to nonlinear models with both discrete and continuous variables, and permits the evaluation of path-specific effects with minimal assumptions regarding the data-generating process. We demonstrate the use of the Mediation Formula in simple examples and illustrate why parametric methods of analysis yield distorted results, even when parameters are known precisely. We stress the importance of distinguishing between the necessary and sufficient interpretations of “mediated-effect” and show how to estimate the two components in nonlinear systems with continuous and categorical variables.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Fig. 1
Fig. 2

Similar content being viewed by others

Notes

  1. This can be seen vividly by setting α = γ = 0, implying zero direct and indirect effects; yet, if ϵ 2 and ϵ 3 are correlated, the regression coefficient R YX ·Z will not equal zero, but − βcov(ϵ 2, ϵ 3)/var(ϵ 2).

  2. Although Judd and Kenny (1981) recognized the importance of controlling for mediator-output confounders, the point was not mentioned in the influential paper of Baron and Kenny (1986) and, as a result, it has been ignored by most researchers in the social and psychological sciences (Judd and Kenny 2010).

  3. This follows from the fact that the regressional image of Eq. 1, R YX  − R YX ·Z  = R ZX R YZ ·X , is a universal identity among regression coefficients of any three variables, and has nothing to do with causation or mediation. It will continue to hold regardless of whether confounders are present, whether the underlying model is linear or nonlinear, or whether the arrows in the model of Fig. 1a point in the right direction. The equality also holds among the OLS estimates of these parameters regardless of sample size (Hahn and Pearl 2011). Note the essential distinction between structural and regressional parameters, often conflated by some writers (Rubin 2010; Sobel 2008); the former convey causal relationships, the latters are purely statistical (Pearl 2011c). Conditions for their equality can be found in p. 150 Pearl (2009).

  4. A complete set of techniques is now available for neutralizing error dependencies, whenever possible, both by covariate adjustment and through the use of instrumental variables (Pearl 2009; Shpitser and Pearl 2008; Tian and Shpitser 2010). These techniques are directly applicable to the analysis of mediations (Pearl 2009, p. 128; Pearl 2011a, d; Shpitser and VanderWeele 2011), but are beyond the scope of this paper.

  5. The general causal expression for CDE(z), which does not assume error-independence is given by:

    $$ CDE(z) = E[Y|do(X=1, Z=z)] - E[Y|do(X=0, Z=z)] $$

    (see Pearl 2009, p. 127) or, using the structural equations of Eq. 2,

    $$ CDE(z) = E[F_3(1, z, \epsilon_3)]- E[F_3(0, z, \epsilon_3)] $$

    A necessary and sufficient condition for estimating CDE(z) in observational studies (in the presence of unobserved confounders and any set Z of mediators) can be derived using do-calculus (Pearl 2009, pp. 85–88), and is given in Shpitser and Pearl (2008) and Tian and Shpitser (2010).

  6. Using the structural model of Eq. 2, the formal definition of the natural direct effect reads:

    $$ NDE_{x,x'}(Y) = E[F_3(x', F_2(x,\epsilon_2), \epsilon_3)]- E[F_3(x, F_2(x, \epsilon_2), \epsilon_3)] $$

    Robins and Greenland (1992) called this notion of direct effect “Pure” while Pearl called it “Natural,” to stress the natural, unperturbed distribution of values, Z = F 2(x, ϵ 2) at which we “freeze” Z while changing X from X = x to X = x′. For discussions regarding policy implications of NDE versus CDE, see (Albert and Nelson 2011; Hafeman and Schwartz 2009; Joffe et al. 2007; Kaufman 2010; Pearl 2001, 2009, p. 132; Robins 2003; Robins and Richardson 2011).

  7. In the presence of measured and unmeasured confounders, the general conditions under which NDE is estimable from population data are somewhat more stringent than those needed for CDE (footnote 5). For details see Avin et al. (2005), Kaufman (2010), Pearl (2001, 2011d), Petersen et al. (2006), Robins (2003), Robins and Richardson (2011), and Shpitser and VanderWeele (2011) and VanderWeele (2009).

  8. By “explain” we mean “sufficient to sustain even in the absence of direct effect.” By “owed to” we mean “would not occur absent of mediation.” These interpretations follow from the counterfactual definitions formulated in Section “Total, Direct and Indirect Effects”, of which Eqs. 6 and 8 are derived statistical estimands.

  9. The degree of moderation exerted by any variable Z is measured by the difference between the controlled direct effects at two levels of Z, CDE(Z = z 1) − CDE(Z = z 0) (see Eq. 3). As in mediation, when confounding is present, an unbiased estimation of moderation requires adjustments for covariates that can be identified by graphical methods (see footnote 5).

  10. These percentages refer to population-level proportions, not to individuals. It is quite possible that more than 30.4% of those recovered will remain ill without enhanced enzyme secretion, if a balancing group of uncured patients would actually gain recovery as a result of no enhancement.

  11. In practice, the estimates produced may still suffer from misspecification bias, finite-sample bias, and sample-selection bias (see Bareinboim and Pearl 2011) and one should also address the question of generalizability (or external validity), as treated in Pearl and Bareinboim (2011).

References

  • Albert, J. M., & Nelson, S. (2011). Generalized causal mediation analysis. Biometrics, 3, 1028–1038. doi:10.1111/j.1541-0420.2010.01547.x

    Google Scholar 

  • Alwin, D., & Hauser, R. (1975). The decomposition of effects in path analysis. American Sociological Review, 40, 37–47.

    Article  Google Scholar 

  • Avin, C., Shpitser, I., & Pearl, J. (2005). Identifiability of path-specific effects. In Proceedings of IJCAI-05 (pp. 357–363). Edinburgh: Morgan-Kaufmann.

    Google Scholar 

  • Bareinboim, E., & Pearl, J. (2011). Controlling selection bias in causal inference. (Tech. Rep. No. R-381). University of California, Los Angeles, CA: Department of Computer Science. Retrieved from http://ftp.cs.ucla.edu/pub/stat_ser/r381.pdf.

  • Baron, R. M., & Kenny, D. A. (1986). The moderator-mediator variable distinction in social psychological research. Journal of Personality and Social Psychology, 51, 1173–1182.

    Article  PubMed  CAS  Google Scholar 

  • Bollen, K. (1989). Structural equations with latent variables. New York: Wiley.

    Google Scholar 

  • Bullock, J. G., Green, D. P., & Ha, S. E. (2010). Yes, but what’s the mechanism? Journal of Personality and Social Psychology, 98, 550–558.

    Article  PubMed  Google Scholar 

  • Cole, S., & Hernán, M. (2002). Fallibility in estimating direct effects. International Journal of Epidemiology, 31, 163–165.

    Article  PubMed  Google Scholar 

  • Glynn, A. (2012). The product and difference fallacies for indirect effects. American Journal of Political Science, 56(1), 257–269.

    Article  Google Scholar 

  • Hafeman, D., & Schwartz, S. (2009). Opening the black box: A motivation for the assessment of mediation. International Journal of Epidemiology, 3, 838–845.

    Article  Google Scholar 

  • Hahn, J., & Pearl, J. (2011). Precision of composite estimators (Tech. Rep. No. R-388). University of California, Los Angeles, CA: Department of Computer Science. Retrieved from http://ftp.cs.ucla.edu/pub/stat_ser/r388.pdf.

  • Imai, K., Keele, L., & Tingley, D. (2010a). A general approach to causal mediation analysis. Psychological Methods, 15, 309–334.

    Article  PubMed  Google Scholar 

  • Imai, K., Keele, L., Tingley, D., & Yamamoto, T. (2010b). Causal mediation analysis using R. In H. Vinod (Eds.), Lecture notes in statistics: Advances in social science research using R (pp. 129–154). New York: Springer.

    Chapter  Google Scholar 

  • Imai, K., Keele, L., & Yamamoto, T. (2010c). Identification, inference, and sensitivity analysis for causal mediation effects. Statistical Science, 25, 51–71.

    Article  Google Scholar 

  • Jo, B. (2008). Causal inference in randomized experiments with mediational processes. Psychological Methods, 13, 314–336.

    Article  PubMed  Google Scholar 

  • Joffe, M., Small, D., & Hsu, C.-Y. (2007). Defining and estimating intervention effects for groups that will develop an auxiliary outcome. Statistical Science, 22, 74–97.

    Article  Google Scholar 

  • Judd, C. M., & Kenny, D. A. (1981). Estimating the effects of social interactions. Cambridge, England: Cambridge University Press.

    Google Scholar 

  • Judd, C. M., & Kenny, D. A. (2010). Data analysis in social psychology: Recent and recurring issues. In D. Gilbert, S. T. Fiske, & G. Lindzey (Eds.), The handbook of social psychology (Vol. 17, 5th ed., pp. 115–139). Boston: McGraw-Hill.

    Google Scholar 

  • Kaufman, J. (2010). Invited commentary: Decomposing with a lot of supposing. American Journal of Epidemiology, 172, 1349–1351.

    Article  PubMed  Google Scholar 

  • Kraemer, H., Kiernan, M., Essex, M., & Kupfer, D. (2008). How and why criteria defining moderators and mediators differ between the Baron & Kenny and MacArthur approaches. Health Psychology, 27, S101–S108.

    Article  Google Scholar 

  • MacKinnon, D. (2008). Introduction to statistical mediation analysis. New York, NY: Erlbaum.

    Google Scholar 

  • MacKinnon, D., Fairchild, A., & Fritz, M. (2007). Mediation analysis. Annual Review of Psychology, 58, 593–614.

    Article  PubMed  Google Scholar 

  • MacKinnon, D., Lockwood, C., Brown, C., Wang, W., & Hoffman, J. (2007). The intermediate endpoint effect in logistic and probit regression. Clinical Trials, 4, 499–513.

    Article  PubMed  CAS  Google Scholar 

  • Mortensen, L., Diderichsen, F., Smith, G., & Andersen, A. (2009). The social gradient in birthweight at term. Human Reproduction, 24, 2629–2635.

    Article  PubMed  Google Scholar 

  • Pearl, J. (1998). Graphs, causality, and structural equation models. Sociological Methods and Research, 27, 226–284. doi:10.1177/0049124198027002004.

    Article  Google Scholar 

  • Pearl, J. (2000). Comment on A.P. Dawid’s, Causal inference without counterfactuals. Journal of the American Statistical Association, 95, 428–431. doi:10.2307/2669380.

    Google Scholar 

  • Pearl, J. (2001). Direct and indirect effects. In J. Breese & D. Koller (Eds.), Uncertainty in artif icial intelligence, proceedings of the seventeenth conference (pp. 411–420). San Francisco: Morgan Kaufmann.

    Google Scholar 

  • Pearl, J. (2009). Causality: Models, reasoning, and inference (2nd ed.). New York: Cambridge University Press.

    Google Scholar 

  • Pearl, J. (2010). An introduction to causal inference. The International Journal of Biostatistics, 6, Article 7. doi:10.2202/1557-4679.1203.

  • Pearl, J. (2011a). The mediation formula: A guide to the assessment of causal pathways in non-linear models. In C. Berzuini, P. Dawid, & L. Bernardinelli (Eds.), Causal inference: Statistical perspectives and applications. Chichester, England: Wiley. In press.

  • Pearl, J. (2011b). Principal stratification—A goal or a tool? The International Journal of Biostatistics, 7, Article 20. doi:10.2202/1557-4679.1322.

  • Pearl, J. (2011c). Trygve Haavelmo and the emergence of causal calculus. (Tech. Rep. No. R-391). University of California, Los Angeles, CA: Department of Computer Science. Retrieved from http://ftp.cs.ucla.edu/pub/stat_ser/r391.pdf.

  • Pearl, J. (2011d). Interpretable conditions for identifying natural direct effects. (Tech. Rep. No. R-389). University of California, Los Angeles, CA: Department of Computer Science. Retrieved from http://ftp.cs.ucla.edu/pub/stat_ser/r389.pdf.

  • Pearl, J., & Bareinboim, E. (2011). Transportability of causal and statistical relations: A formal approach. In AAAI conference on artificial intelligence, proceedings of the twentieth conference (pp. 247–254). San Francisco: AAAI Press.

    Google Scholar 

  • Petersen, M., Sinisi, S., & van der Laan, M. (2006). Estimation of direct causal effects. Epidemiology, 17, 276–284.

    Article  PubMed  Google Scholar 

  • Robins, J. (2003). Semantics of causal DAG models and the identification of direct and indirect effects. In P. Green, N. Hjort, & S. Richardson (Eds.), Highly structured stochastic systems (pp. 70–81). New York, NY: Oxford University Press.

    Google Scholar 

  • Robins, J., & Greenland, S. (1992). Identifiability and exchangeability for direct and indirect effects. Epidemiology, 3, 143–155.

    Article  PubMed  CAS  Google Scholar 

  • Robins, J., & Richardson, T. (2011). Alternative graphical causal models and the identification of direct effects. In P. E. Shrout, K. M. Keyes, & K. Ornstein (Eds.), Causality and psychopathology, finding the determinants of disorder and their cures (pp. 103–158). New York: Oxford University Press.

    Google Scholar 

  • Rubin, D. B. (2010). Reflections stimulated by the comments of Shadish (2010) and West and Thoemmes (2010). Psychological Methods, 15, 38–46.

    Article  PubMed  Google Scholar 

  • Shpitser, I., & Pearl, J. (2008). Complete identification methods for the causal hierarchy. Journal of Machine Learning Research, 9, 1941–1979.

    Google Scholar 

  • Shpitser, I., & VanderWeele, T. (2011). A complete graphical criterion for the adjustment formula in mediation analysis. The International Journal of Biostatistics, 7, Article 16, 1–24.

    Google Scholar 

  • Sjölander, A. (2009). Bounds on natural direct effects in the presence of confounded intermediate variables. Statistics in Medicine, 28, 558–571.

    Article  PubMed  Google Scholar 

  • Sobel, M. E. (2008). Identification of causal parameters in randomized studies with mediating variables. Journal of Educational and Behavioral Statistics, 33, 230–231.

    Article  Google Scholar 

  • Tian, J., & Shpitser, I. (2010). On identifying causal effects. In R. Dechter, H. Geffner, & J. Halpern (Eds.), Heuristics, probability and causality (pp. 415–444). London, UK: College Publications.

    Google Scholar 

  • VanderWeele, T. (2009). Marginal structural models for the estimation of direct and indirect effects. Epidemiology, 20, 18–26.

    Article  PubMed  Google Scholar 

  • VanderWeele, T., & Vansteelandt, S. (2009). Conceptual issues concerning mediation, interventions and composition. Statistics and Its Interface, 2, 457–468.

    Google Scholar 

Download references

Acknowledgements

This paper has benefited from the comments of three anonymous reviewers and from discussions with Kosuke Imai, Booil Jo, Marshall Joffe, David A. Kenny, Helena Kraemer, David MacKinnon, Ilya Shpitser, Patrick Shrout, Steven Sussman, Dustin Tingley, Mark VanderLaan, and Tyler VanderWeele. This research was supported in parts by grants from NIH #1R01 LM009961-01, NSF #IIS-0914211 and #IIS-1018922, and ONR #N000-14-09-1-0665 and #N00014-10-1-0933.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Judea Pearl.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Pearl, J. The Causal Mediation Formula—A Guide to the Assessment of Pathways and Mechanisms. Prev Sci 13, 426–436 (2012). https://doi.org/10.1007/s11121-011-0270-1

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11121-011-0270-1

Keywords

Navigation