Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2011 Sep;43(3):692-700.
doi: 10.3758/s13428-011-0076-x.

RMediation: an R package for mediation analysis confidence intervals

Affiliations

RMediation: an R package for mediation analysis confidence intervals

Davood Tofighi et al. Behav Res Methods. 2011 Sep.

Abstract

This article describes the RMediation package,which offers various methods for building confidence intervals (CIs) for mediated effects. The mediated effect is the product of two regression coefficients. The distribution-of-the-product method has the best statistical performance of existing methods for building CIs for the mediated effect. RMediation produces CIs using methods based on the distribution of product, Monte Carlo simulations, and an asymptotic normal distribution. Furthermore, RMediation generates percentiles, quantiles, and the plot of the distribution and CI for the mediated effect. An existing program, called PRODCLIN, published in Behavior Research Methods, has been widely cited and used by researchers to build accurate CIs. PRODCLIN has several limitations: The program is somewhat cumbersome to access and yields no result for several cases. RMediation described herein is based on the widely available R software, includes several capabilities not available in PRODCLIN, and provides accurate results that PRODCLIN could not.

PubMed Disclaimer

Figures

Fig. 1
Fig. 1
Kernel density plot of the distribution of the product of two normal variables (i.e., mediated effect) and the 90% CI with error bars for the mediated effect, with â = 0.295, = 1.673, SE(â) = 0.163, and SE() = 0.695. LL lower limit, UL upper limit

Similar articles

Cited by

References

    1. Alwin DF, Hauser RM. Decomposition of effects in path analysis. American Sociological Review. 1975;40:37–47.
    1. Baron RM, Kenny DA. The moderator-mediator variable distinction in social psychological research: Conceptual, strategic, and statistical considerations. Journal of Personality and Social Psychology. 1986;51:1173–1182. - PubMed
    1. Craig CC. On the frequency function of xy. Annals of Mathematical Statistics. 1936;7:1–15.
    1. R Development Core Team. R: A language and environment for statistical computing [Computer software] Vienna, Austria: 2010. Available from http://www.R-project.org.
    1. Good PI. Resampling methods: A practical guide to data analysis. 3rd ed. Boston: Birkhäuser; 2006.

Publication types

LinkOut - more resources