Causal Moderated Mediation Analysis
Overview
Causal moderated mediation analysis using the methods proposed by Qin and Wang (2023) doi:10.3758/s13428-023-02095-4. Causal moderated mediation analysis is crucial for investigating how, for whom, and where a treatment is effective by assessing the heterogeneity of mediation mechanism across individuals and contexts. This package enables researchers to estimate and test the conditional and moderated mediation effects, assess their sensitivity to unmeasured pre-treatment confounding, and visualize the results. The package is built based on the quasi-Bayesian Monte Carlo method, because it has relatively better performance at small sample sizes, and its running speed is the fastest. The package is applicable to a treatment of any scale, a binary or continuous mediator, a binary or continuous outcome, and one or more moderators of any scale.
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK14 OK2026-03-10
Documentation
- Help pages
- 6
- Examples that run
- 20%1 run in a plain check · 4 only when donttest examples are enabled (R CMD check --as-cran)
- Exported functions with examples
- 100%
- Documented parameters
- 85%
- Return-value docs
- 100%
- Help pages citing references
- 83%
Downloads
Dependencies
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- 0.0.12Latest
- RR 4.5.0 released · 2025-04-11
- 0.0.112025-04-04 · diff ↗
- 0.0.102024-05-23 · diff ↗
- 0.0.92024-04-24 · diff ↗
- RR 4.4.0 released · 2024-04-24
- unarchivedReturned to CRAN2024-02-29
- 0.0.82024-02-29 · diff ↗
- archivedRemoved from CRAN2024-02-11policy violations Including sending CRAN painful HTML and requiring an orphaned package
- 0.0.72023-11-27 · diff ↗
- 0.0.62023-10-19 · diff ↗
- unarchivedReturned to CRAN2023-06-06
- 0.0.52023-06-06 · diff ↗
- archivedRemoved from CRAN2023-05-11policy violation Using all the CPU cores by default
- 0.0.42023-04-27 · diff ↗
Package metadata
- First published
- 2023-02-15
- Total releases
- 12 / 3 yrs
- License
- GPL-2 OSI
- Minimum R
- ≥ 3.5.0
- Bundled data
- 11 KB / 1 file
- Download size
- 54 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("moderate.mediation")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-19, which the citation names so these numbers can be found later. More on citing and the projects behind them.