Mediation Analysis Confidence Intervals
Overview
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.
Naming convention cleanup
p_prod3()is renamed topprodnormal3()to match the existingpprodnormal()/qprodnormal()family.p_prod3()remains available as a silent (non-warning) alias and will gain a formal deprecation warning in a future release.ProductNormal2()remains available but is superseded byProductNormal()for direct construction; internal callers now useProductNormal()directly.- The
ci()generic's dispatch argument is renamed frommutoobjectfor consistency with the package's other S7 generics (cdf(),dist_quantile()). This only affects callers usingci(mu = ...)as a named argument; positional calls (ci(mu, ...)) are unaffected.
Show all changes in 1.6.1Hide the rest of the changes in 1.6.1
- Undocumented internal helpers (
validate_ProductNormal(),is_valid_for_computation(),ProductNormal_from_lavaan()) are now hidden from the package documentation index (@noRd); they remain available internally but are not part of the public API. | Old | New | |-----|-----| |p_prod3(q, mean, cov, ...)|pprodnormal3(q, mean, cov, ...)| |ci(mu = ..., Sigma = ..., quant = ...)|ci(..., Sigma = ..., quant = ...)(positional) |
Documentation and lint
- Added
@examplesto all exported functions/generics that previously lacked them, addressinggoodpractice::gp()advisories ahead of CRAN resubmission.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
- OK12 OK2026-04-25
Show 1 earlier changeHide 1 earlier change
- ERROR13 OK, 1 ERROR2026-03-10
Documentation
- Help pages
- 30 (12 internal)includes a package overview page
- Examples that run
- 84%16 run in a plain check · 3 never run
- Exported functions with examples
- 100%
- Documented parameters
- 100%
- Return-value docs
- 76%
- Help pages citing references
- 23%
Downloads
Repository
- PRs merged (all time)
- 99%
- Median days to close, 50 most recently updated closed issues
- 7
- Median days to close, 50 most recently updated closed PRs
- 0
Releases over time
Issues over time
PRs over time
Commits over time
9 development-tooling and community-health practices detected across 6 families in the upstream repository
Checks run against github.com/data-wise/rmediation on 2026-10-21.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-08-23 · The repository has a site deploy workflow
pkgdown site last built 2026-08-17
Show all practicesHide 2 practices
This repository shows signs of AI coding tools.
- Claude Codefirst seen 2025-11-16Seen in the repository: CLAUDE.mdNamed in .Rbuildignore: .claude, CLAUDE.mdNamed in .gitignore: .claudePull request it wrote: opened by a project memberCommits: at least 91 crediting it in the message
- Gemini CLIfirst seen 2025-11-18Seen in the repository: GEMINI.mdNamed in .Rbuildignore: GEMINI.md
- Qwen Codefirst seen 2025-11-20Named in .Rbuildignore: QWEN.mdNamed in .gitignore: QWEN.md
- Julesfirst seen 2025-11-20Pull request: opened by its own accountCommits: 1 by its own account
- Claude Sonnet 4.643 commits · Jun 2026
- Claude Opus 4.814 commits · May to Jun 2026
- Claude Sonnet 53 commits · Jun to Jul 2026
Dependencies
Installing RMediation adds 10 packages (8 with compiled code, 7.2 MB of source tarballs). Heaviest: cubature 3.2 MB, Rcpp 1.8 MB, lavaan 1.6 MB.
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- unarchivedReturned to CRAN2023-05-03
- RR 4.3.0 released · 2023-04-21
- archivedRemoved from CRAN2022-10-03check issues were not corrected despite reminders
- RR 4.2.0 released · 2022-04-22
- RR 4.1.0 released · 2021-05-18
- RR 4.0.0 released · 2020-04-24
- RR 3.6.0 released · 2019-04-26
- RR 3.5.0 released · 2018-04-23
- RR 3.4.0 released · 2017-04-21
- RR 3.3.0 released · 2016-05-03
- archivedRemoved from CRAN2015-10-29check problems were not corrected despite reminders
- RR 3.2.0 released · 2015-04-16
- RR 3.1.0 released · 2014-04-10
Show 19 earlier eventsHide 19 earlier events
- RR 3.0.0 released · 2013-04-03
- RR 2.15.0 released · 2012-03-30
- RR 2.14.0 released · 2011-10-31
- RR 2.13.0 released · 2011-04-13
- 2.12.1Latest
- RR 2.12.0 released · 2010-10-15
- 2.12.0
- 1.6.1
- 1.5.02026-06-20 · diff ↗ ·
added 8 exports
MBCOResult, ProductNormal, ProductNormal2, cdf, ci_mediation_data, ci_serial_mediation_data, dist_quantile, medci_prototype - 1.3.0
- 1.2.22023-05-12 · diff ↗
- 1.2.12023-05-03 · diff ↗
- 1.2.0
- 1.1.4
- 1.1.3
- 1.1.22013-09-12 · diff ↗
- 1.12011-10-10 · diff ↗
- 1.02011-02-08
- RR 2.11.0 released · 2010-04-22
Package metadata
- First published
- 2010-07-02
- Total releases
- 13 / 16 yrs
- License
- GPL (>= 3) | file LICENSE OSI
- Minimum R
- ≥ 4.1.0
- Bundled data
- 0.9 KB / 1 file
- Download size
- 707 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("RMediation")The package provides a citation file that builds its entry when R runs it. Run citation() to see it.
The repository also keeps a CITATION.cff.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.