Package: RMediation 1.6.1

Davood Tofighi

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>.

Authors:Davood Tofighi [aut, cre]

RMediation_1.6.1.tar.gz
RMediation_1.6.1.tar.gz(r-4.7-any)RMediation_1.6.1.tar.gz(r-4.6-any)
RMediation_1.6.1.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
RMediation/json (API)

# Install 'RMediation' in R:
install.packages('RMediation', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/data-wise/rmediation/issues

Pkgdown/docs site:https://data-wise.github.io

Datasets:
  • memory_exp - Memory Experiment Data Description from MacKinnon et al., 2018

On CRAN:

Conda:

6.54 score 4 stars 1 packages 64 scripts 735 downloads 11 mentions 19 exports 11 dependencies

Last updated from:1e1b8a1c14. Checks:4 OK. Indexed: no.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK187
source / vignettesOK197
linux-release-x86_64OK170
wasm-releaseOK147

Exports:cdfcici_mediation_dataci_serial_mediation_datadist_quantilembcoMBCOResultmedcimedci_prototypep_prod3pMCpprodnormalpprodnormal3ProductNormalProductNormal2ProductNormal3qMCqprodnormaltidy

Dependencies:backportscheckmatecubaturelavaanMASSmnormtnumDerivpbivnormquadprogRcppS7

Comparing Confidence Interval Methods in RMediation
Introduction | Overview of Methods | Method Comparison | Performance and Accuracy Comparison | When to Use Each Method | Distribution of Product (DOP) | Monte Carlo (MC) | Asymptotic Normal | Working with S7 Classes | Practical Recommendations | Conclusion

Last update: 2026-07-22
Started: 2026-06-20

Getting Started with RMediation
Introduction | Basic Usage | Single Mediator Analysis | Multiple Mediators | Three-Variable Indirect Effects (ProductNormal3) | Using S7 Classes | Available Methods | Integration with Structural Equation Modeling | Validation and Error Handling | Conclusion

Last update: 2026-07-22
Started: 2026-06-20

Serial Mediation with medfit
Why this vignette | A serial chain from a lavaan fit | The same chain from lm/glm fits | Graceful degradation without medfit | See also

Last update: 2026-07-22
Started: 2026-06-20