RMediation: Mediation Analysis Confidence Intervals

Computes confidence intervals for nonlinear functions of model parameters (e.g., product of k coefficients) in single-level and multilevel structural equation models. Methods include the distribution of the product, Monte Carlo simulation, and bootstrap methods. It also performs the Model-Based Constrained Optimization (MBCO) procedure for hypothesis testing of indirect effects. References: Tofighi, D., and MacKinnon, D. P. (2011). RMediation: An R package for mediation analysis confidence intervals. Behavior Research Methods, 43, 692-700. <doi:10.3758/s13428-011-0076-x>; Tofighi, D., and Kelley, K. (2020). Improved inference in mediation analysis: Introducing the model-based constrained optimization procedure. Psychological Methods, 25(4), 496-515. <doi:10.1037/met0000259>; Tofighi, D. (2020). Bootstrap Model-Based Constrained Optimization Tests of Indirect Effects. Frontiers in Psychology, 10, 2989. <doi:10.3389/fpsyg.2019.02989>.

Version: 1.5.0
Depends: R (≥ 4.1.0)
Imports: checkmate (≥ 2.1.0), graphics (≥ 4.1.0), grDevices (≥ 4.1.0), lavaan (≥ 0.5-20), MASS (≥ 7.3), methods, S7
Suggests: knitr, medfit (≥ 0.2.0), OpenMx (≥ 2.13), rmarkdown, testthat (≥ 3.0.0)
Published: 2026-06-20
DOI: 10.32614/CRAN.package.RMediation
Author: Davood Tofighi ORCID iD [aut, cre]
Maintainer: Davood Tofighi <dtofighi at gmail.com>
BugReports: https://github.com/data-wise/rmediation/issues
License: GPL (≥ 3) | file LICENSE
URL: https://data-wise.github.io/rmediation/, https://github.com/data-wise/rmediation
NeedsCompilation: no
Materials: README, NEWS
CRAN checks: RMediation results

Documentation:

Reference manual: RMediation.html , RMediation.pdf
Vignettes: Getting Started with RMediation (source, R code)
Comparing Confidence Interval Methods in RMediation (source, R code)
Serial Mediation with medfit (source, R code)

Downloads:

Package source: RMediation_1.5.0.tar.gz
Windows binaries: r-devel: RMediation_1.5.0.zip, r-release: RMediation_1.5.0.zip, r-oldrel: RMediation_1.5.0.zip
macOS binaries: r-release (arm64): RMediation_1.5.0.tgz, r-oldrel (arm64): RMediation_1.5.0.tgz, r-release (x86_64): RMediation_1.5.0.tgz, r-oldrel (x86_64): RMediation_1.5.0.tgz
Old sources: RMediation archive

Linking:

Please use the canonical form https://CRAN.R-project.org/package=RMediation to link to this page.