Learn R Programming

moderate.mediation (version 0.0.11)

Causal Moderated Mediation Analysis

Description

Causal moderated mediation analysis using the methods proposed by Qin and Wang (2023) . 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.

Copy Link

Version

Install

install.packages('moderate.mediation')

Monthly Downloads

212

Version

0.0.11

License

GPL-2

Maintainer

Xu Qin

Last Published

April 3rd, 2025

Functions in moderate.mediation (0.0.11)

newws

NEWWS Riverside data
modmed.plot

Visual Representation of the Causal Moderated Mediation Analysis Results
summary_modmed

Summarizing Output for Causal Moderated Mediation Analysis
sens.plot

Simulation-Based Sensitivity Analysis Plot for Causal Moderated Mediation Analysis
modmed

Causal Moderated Mediation Analysis
modmed.sens

Simulation-Based Sensitivity Analysis Table for Causal Moderated Mediation Analysis