Skip to content

moderate.mediation

Causal Moderated Mediation Analysis

v0.0.12 · Aug 22, 2025 · GPL-2

Description

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.

Downloads

605

Last 30 days

6541st

1.8K

Last 90 days

5.5K

Last year

Trend: -4.9% (30d vs prior 30d)

CRAN Check Status

14 OK
Show all 14 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-macos-arm64 OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK

Check History

OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026

Dependency Network

Dependencies Reverse dependencies mvtnorm cowplot distr ggplot2 reshape2 doSNOW scales foreach earth moderate.mediation

Version History

new 0.0.12 Mar 10, 2026
updated 0.0.12 ← 0.0.11 diff Aug 21, 2025
updated 0.0.11 ← 0.0.10 diff Apr 3, 2025
updated 0.0.10 ← 0.0.9 diff May 22, 2024
updated 0.0.9 ← 0.0.8 diff Apr 23, 2024
updated 0.0.8 ← 0.0.7 diff Feb 28, 2024
updated 0.0.7 ← 0.0.6 diff Nov 26, 2023
updated 0.0.6 ← 0.0.5 diff Oct 18, 2023
updated 0.0.5 ← 0.0.4 diff Jun 5, 2023
updated 0.0.4 ← 0.0.3 diff Apr 26, 2023
updated 0.0.3 ← 0.0.2 diff Apr 25, 2023
updated 0.0.2 ← 0.0.1 diff Mar 17, 2023
new 0.0.1 Feb 14, 2023