Skip to content

mediation

4.5.1Package record

Causal Mediation Analysis

6packages dependsuggested by 12
287.9Kdownloads / year
0.1%test coverage
11/13flavors OK

Overview

About

We implement parametric and non parametric mediation analysis. This package performs the methods and suggestions in Imai, Keele and Yamamoto (2010) DOI:10.1214/10-STS321, Imai, Keele and Tingley (2010) DOI:10.1037/a0020761, Imai, Tingley and Yamamoto (2013) DOI:10.1111/j.1467-985X.2012.01032.x, and Imai and Yamamoto (2013) DOI:10.1093/pan/mps040. In addition to the estimation of causal mediation effects, the software also allows researchers to conduct sensitivity analysis for certain parametric models.

Install

Health

CRAN checks
2NOTE11OK
Check messages
NOTECRAN incoming feasibilityr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc
Maintainer: ‘Teppei Yamamoto <tyamam@waseda.jp>’

Found the following (possibly) invalid file URI:
  URI: dtingley@gov.harvard.edu
    From: inst/doc/mediation-old.pdf

CRAN check page ↗

Slowest check: 7.7 min · r-oldrel-windows-x86_64
Status changes
  • NOTE11 OK, 2 NOTE2026-07-23
  • ERROR11 OK, 1 NOTE, 1 ERROR2026-07-07
  • NOTE11 OK, 2 NOTE2026-06-09
  • ERROR11 OK, 1 NOTE, 1 ERROR2026-06-07
  • NOTE12 OK, 2 NOTE2026-03-10
Advisories

none known

Documentation

In release 4.5.1
READMEYes · 60 wordsVignettesYes · 2 · dynamicNEWSYes · 67% structured · does not mention 4.5.1Citation fileYes · cites a publicationWebsiteYes
Help pages
33includes a package overview page
Examples that run
63%12 run in a plain check · 6 never run · 1 hold no code
Exported functions with examples
100%
Documented parameters
99%
Return-value docs
100%
Help pages citing references
76%

Also includes 1 demo script (run with demo())

Downloads

287.9K
CRAN downloads in the past year
Rank #802 · ~789/day · ~24K/mo
Daily download trend is not available in this view yet.
18.6K30 days
57.5K90 days
287.9K1 year
Compare downloads with other packages →
Also on775 r2u6 autocran2.7K conda_forge204 c2d4u

Dependencies

Declared dependencies
10 external dependencies (excludes base and recommended)

Installing mediation adds 63 packages (35 with compiled code, 67 MB of source tarballs). Heaviest: stringi 11 MB, ggplot2 6.0 MB, data.table 5.7 MB.

Depends (5)
R >= 2.15.1MASSMatrixmvtnormsandwich
Imports (8)
lpSolveHmisclme4statsgraphicsgrDevicesutilsboot
LinkingTo (0)
none
Suggests (8)
Enhances (0)
none
Reverse dependencies
6direct
3indirect
Depends 1 · Imports 5
Suggested by 12
Show all 18 packagesHide all 18 packages
Depends, Imports or LinkingTo, most downloaded first
Suggests, most downloaded first

Datasets

People & History

People (7)
Author, Maintainer since 4.1.2 (2012)
Author · added in 4.2.1
Author · added in 4.5.0
Author · added in 4.5.0

Previously maintained by Dustin Tingley (3.0 to 4.1) and Luke Keele (1.0 to 2.1).

Releases (28)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • 4.5.1Latest
    record
    2025-06-08 · current release · diff ↗
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • R
    R 4.3.0 released · 2023-04-21
  • 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
  • 4.5.0
    record
    2019-10-09 · diff ↗ ·
    removed 17 exports
    summary.mediate, plot.mediate, summary.mediate.order, plot.mediate.order, summary.mediate.mer, plot.mediate.mer, summary.medsens, plot.medsens, summary.mediations, plot.mediations, summary.mediations.order, plot.mediations.order, summary.multimed, plot.multimed, summary.mediate.design, summary.ivmediate, plot.ivmediate
    added 1 export
    mediate_tsls
  • R
    R 3.6.0 released · 2019-04-26
  • 4.4.7
    record
    2019-03-17 · diff ↗
  • R
    R 3.5.0 released · 2018-04-23
  • 4.4.6
    record
    2017-07-12 · diff ↗
  • R
    R 3.4.0 released · 2017-04-21
  • R
    R 3.3.0 released · 2016-05-03
  • 4.4.5
    record
    2015-07-18 · diff ↗
Show 33 earlier eventsHide 33 earlier events
  • R
    R 3.2.0 released · 2015-04-16
  • 4.4.4
    record
    2015-03-03 · diff ↗
  • 4.4.3
    record
    2014-11-23 · diff ↗
  • 4.4.2
    record
    2014-08-27 · diff ↗
  • 4.4.1
    record
    2014-08-13 · diff ↗
  • R
    R 3.1.0 released · 2014-04-10
  • 4.4
    record
    2013-12-09 · diff ↗
  • 4.3.1
    record
    2013-10-17 · diff ↗
  • 4.3
    record
    2013-10-14 · diff ↗ ·
    added 3 exports
    ivmediate, summary.ivmediate, plot.ivmediate
  • 4.2.4
    record
    2013-09-26 · diff ↗
  • 4.2.3
    record
    2013-08-26 · diff ↗ ·
    added 3 exports
    test.TMint, test.modmed, amelidiate
  • 4.2.2
    record
    2013-04-18 · diff ↗
  • R
    R 3.0.0 released · 2013-04-03
  • 4.2.1
    record
    2013-03-04 · diff ↗ ·
    added 2 exports
    summary.mediate.mer, plot.mediate.mer
  • 4.2
    record
    2012-12-18 · diff ↗
  • 4.1.2
    record
    2012-08-24 · diff ↗
  • 4.1
    record
    2012-06-03 · diff ↗
  • 4.0.1
    record
    2012-04-20 · diff ↗
  • R
    R 2.15.0 released · 2012-03-30
  • 4.0
    record
    2012-03-20 · diff ↗ ·
    added 8 exports
    multimed, summary.multimed, plot.multimed, mediate.sed, mediate.pd, mediate.ped, mediate.ced, summary.mediate.design
  • R
    R 2.14.0 released · 2011-10-31
  • 3.1.2
    record
    2011-09-20 · diff ↗
  • 3.1.1
    record
    2011-09-19 · diff ↗
  • 3.1
    record
    2011-08-21 · diff ↗
  • 3.0
    record
    2011-05-03 · diff ↗ ·
    added 8 exports
    plot.mediate, summary.mediate.order, plot.mediate.order, mediations, summary.mediations, plot.mediations, summary.mediations.order, plot.mediations.order
  • R
    R 2.13.0 released · 2011-04-13
  • R
    R 2.12.0 released · 2010-10-15
  • R
    R 2.11.0 released · 2010-04-22
  • R
    R 2.10.0 released · 2009-10-26
  • 2.1
    record
    2009-09-18 · diff ↗
  • 2.0
    record
    2009-07-18 · diff ↗
  • 1.0
    record
    2009-06-14
  • R
    R 2.9.0 released · 2009-04-17

Package metadata

First published
2009-06-14
Total releases
28 / 17 yrs
License
GPL (>= 2) OSI
Minimum R
≥ 2.15.1
Bundled data
67 KB / 6 files
Download size
1.2 MB

Cite

Cite this package

Run in R for the authors' entry:

citation("mediation")

The package provides a citation file, so citation() returns the authors' own entry.

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 mediation version 4.5.1 [Data set]. HJJB, LLC. Data release v2026-10-23. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-23, 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