Skip to content

RMediation

1.6.1Package record

Mediation Analysis Confidence Intervals

0packages depend
8.9Kdownloads / year
53.6%test coverage
13/13flavors OK

Overview

About

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.

Changes in 1.6.1

Naming convention cleanup

  • p_prod3() is renamed to pprodnormal3() to match the existing pprodnormal()/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 by ProductNormal() for direct construction; internal callers now use ProductNormal() directly.
  • The ci() generic's dispatch argument is renamed from mu to object for consistency with the package's other S7 generics (cdf(), dist_quantile()). This only affects callers using ci(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 @examples to all exported functions/generics that previously lacked them, addressing goodpractice::gp() advisories ahead of CRAN resubmission.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 4.5 min · r-oldrel-macos-x86_64
Status changes
  • 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
Advisories

none known

Documentation

In release 1.6.1
READMEYes · 610 wordsVignettesYes · 3 · dynamicNEWSYes · 100% structured · mentions 1.6.1Citation fileYes · computed when R runs itWebsiteYes · pkgdown
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

8.9K
CRAN downloads in the past year
Rank #4,837 · ~24/day · ~742/mo
Daily download trend is not available in this view yet.
60430 days
1.7K90 days
8.9K1 year
Compare downloads with other packages →
Also on114 r2u6 autocran

Repository

2Stars
0Forks
1Open issues
1Open PRs
4Releases
283Commits
2Commit identities
causal-inferenceconfidence-intervalslikelihood-ratio-testmediationmediation-analysis
License file reads as GPL-3.0 · 283 commits · Last activity 2026-07-21 · Discussions: 1 post
Responsiveness
How these are sampled
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

2026-07-14 · 32026-08-17 · 4
PracticesBeta

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.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Docs source (3)
pkgdown

GitHub Pages site last deployed 2026-08-23 · The repository has a site deploy workflow

pkgdown site last built 2026-08-17

Coverage (1)
Coverage reporting
Reproducibility and dev environment (1)
data-raw/
Show all practicesHide 2 practices
CRAN release process (1)
cran-comments.md
Research and citation (1)
CITATION.cff
How this is detected·Detection ruleset v4 (2026-10-20)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • Claude Codefirst seen 2025-11-16
    Seen in the repository: CLAUDE.md
    Named in .Rbuildignore: .claude, CLAUDE.md
    Named in .gitignore: .claude
    Pull request it wrote: opened by a project member
    Commits: at least 91 crediting it in the message
  • Gemini CLIfirst seen 2025-11-18
    Seen in the repository: GEMINI.md
    Named in .Rbuildignore: GEMINI.md
  • Qwen Codefirst seen 2025-11-20
    Named in .Rbuildignore: QWEN.md
    Named in .gitignore: QWEN.md
  • Julesfirst seen 2025-11-20
    Pull request: opened by its own account
    Commits: 1 by its own account
Models named in its commits
  • Claude Sonnet 4.643 commits · Jun 2026
  • Claude Opus 4.814 commits · May to Jun 2026
  • Claude Sonnet 53 commits · Jun to Jul 2026
Counts are commits, not lines of code. Commits by a tool's accounts count once across all of its accounts. Commits crediting it are the largest count among its credit lines, a minimum.How this is detected·Detection ruleset v4 (updated 2026-09-27)

Dependencies

Declared dependencies
11 external dependencies (excludes base and recommended)

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.

Depends (1)
R >= 4.1.0
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Datasets

People & History

People (1)
Author, Maintainer since 1.0 (2011)
Listed in earlier versions (1)
David P. MacKinnon
no longer listed · 2.12.0 to 1.1.4
Releases (13)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • unarchivedReturned to CRAN
    2023-05-03
  • R
    R 4.3.0 released · 2023-04-21
  • archivedRemoved from CRAN
    2022-10-03
    check issues were not corrected despite reminders
  • R
    R 4.2.0 released · 2022-04-22
  • R
    R 4.1.0 released · 2021-05-18
  • R
    R 4.0.0 released · 2020-04-24
  • R
    R 3.6.0 released · 2019-04-26
  • R
    R 3.5.0 released · 2018-04-23
  • R
    R 3.4.0 released · 2017-04-21
  • R
    R 3.3.0 released · 2016-05-03
  • archivedRemoved from CRAN
    2015-10-29
    check problems were not corrected despite reminders
  • R
    R 3.2.0 released · 2015-04-16
  • R
    R 3.1.0 released · 2014-04-10
Show 19 earlier eventsHide 19 earlier events
  • R
    R 3.0.0 released · 2013-04-03
  • R
    R 2.15.0 released · 2012-03-30
  • R
    R 2.14.0 released · 2011-10-31
  • R
    R 2.13.0 released · 2011-04-13
  • 2.12.1Latest
    record
    2010-11-21 · current release · diff ↗ ·
    added 1 export
    ci
  • R
    R 2.12.0 released · 2010-10-15
  • 2.12.0
    record
    2010-07-02 · diff ↗ ·
    added 3 exports
    medci, qprodnormal, pprodnormal
  • 1.6.1
    record
    2026-07-21 · diff ↗ ·
    added 3 exports
    ProductNormal3, p_prod3, pprodnormal3
  • 1.5.0
    record
    2026-06-20 · diff ↗ ·
    added 8 exports
    MBCOResult, ProductNormal, ProductNormal2, cdf, ci_mediation_data, ci_serial_mediation_data, dist_quantile, medci_prototype
  • 1.3.0
    record
    2025-11-20 · diff ↗ ·
    added 1 export
    tidy
  • 1.2.2
    record
    2023-05-12 · diff ↗
  • 1.2.1
    record
    2023-05-03 · diff ↗
  • 1.2.0
    record
    2022-07-09 · diff ↗ ·
    added 1 export
    mbco
  • 1.1.4
    record
    2016-03-14 · diff ↗ ·
    added 2 exports
    qMC, pMC
  • 1.1.3
    record
    2014-03-07 · diff ↗ ·
    added 1 export
    ci
  • 1.1.2
    record
    2013-09-12 · diff ↗
  • 1.1
    record
    2011-10-10 · diff ↗
  • 1.0
    record
    2011-02-08
  • R
    R 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.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for RMediation version 1.6.1 [Data set]. HJJB, LLC. Data release v2026-10-24. https://doi.org/10.5281/zenodo.21843040

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.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy