Learn R Programming

R package mediation: causal mediation analysis

We implement parametric and non parametric mediation analysis. This package performs the methods and suggestions in Imai, Keele and Yamamoto (2010), Imai, Keele and Tingley (2010), Imai, Tingley and Yamamoto (2013), Imai and Yamamoto (2013) and Yamamoto (2013). In addition to the estimation of causal mediation effects, the software also allows researchers to conduct sensitivity analysis for certain parametric models.

Copy Link

Version

Install

install.packages('mediation')

Monthly Downloads

14,991

Version

4.5.0

License

GPL (>= 2)

Maintainer

Last Published

October 8th, 2019

Functions in mediation (4.5.0)

framing

Brader, Valentino and Suhay (2008) Framing Experiment Data
mediate

Causal Mediation Analysis
amelidiate

Function for combining outputs from mediations function and calculating quantities of interest. For use with multiple imputation procedures.
CEDdata

Example Data for the Crossover Encouragement Design
mediate.ced

Estimating Average Causal Mediation Effects under the Crossover Encouragement Design
plot.mediate.mer

Plotting Indirect, Direct, and Total Effects from Mediation Analysis of Multilevel Models
plot.mediations

Plotting Indirect, Direct, and Total Effects from Multiple Mediation Analyses
mediation

mediation: Parametric and non parametric mediation analysis.
mediations

Causal Mediation Analysis for Multiple Outcome/Treatment/Mediator Combinations
medsens

Sensitivity Analysis for Causal Mediation Effects
multimed

Estimation and Sensitivity Analysis for Multiple Causal Mechanisms
student

Hypothetical student-level data
plot.mediate

Plotting Indirect, Direct, and Total Effects from Mediation Analysis
school

School-level data
plot.ivmediate

Plotting Local Indirect, Direct, and Total Effects from Mediation Analysis with Treatment Noncompliance
summary.mediations

Summarizing Output from Multiple Mediation Analyses
test.modmed

Significance Test for Moderated Mediation
summary.medsens

Summarizing Results from Sensitivity Analysis for Causal Mediation Effects
mediate_tsls

Two-stage Least Squares Estimation of the Average Causal Mediation Effects
mediate.sed

Estimating Average Causal Mediation Effects under the Single Experiment Design
summary.mediate.mer

Summarizing Output from Mediation Analysis of Multilevel Models
summary.mediate.design

Summarizing Output from Design Based Mediation Analysis
summary.ivmediate

Summarizing Output from Mediation Analysis with Treatment Noncompliance
test.TMint

Significance Test for Treatment-Mediator Interaction in Causal Mediation Analysis
summary.multimed

Summarizing Output from Mediation Analysis with Multiple Mechanisms
summary.mediate

Summarizing Output from Mediation Analysis
plot.multimed

Plotting the Results of Causal Mediation Analysis for Multiple Mechanisms
plot.medsens

Plotting Results from Sensitivity Analysis for Causal Mediation Effects
mediate.ped

Computing Bounds on Average Causal Mediation Effects under the Parallel Encouragement Design
jobs

JOBS II data
ivmediate

Causal Mediation Analysis with Treatment Noncompliance
boundsdata

Example Data for the Design Functions
mediate.pd

Estimating Average Causal Mediation Effects under the Parallel Design