Mediation Analysis Based on the Product Method
Overview
Functions for calculating the point and interval estimates of the natural indirect effect (NIE), total effect (TE), and mediation proportion (MP), based on the product approach. We perform the methods considered in Cheng, Spiegelman, and Li (2021) Estimating the natural indirect effect and the mediation proportion via the product method.
Install
Health
NOTECRAN incoming feasibilityr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc
Maintainer: ‘Chao Cheng <c.cheng@yale.edu>’
No Authors@R field in DESCRIPTION.
Please add one, modifying
Authors@R: c(person(given = c("Chao", "Cheng;", "Donna", "Spiegelman;", "Fan"),
family = "Li",
role = "aut"),
person(given = "Chao",
family = "Cheng",
role = "cre",
email = "c.cheng@yale.edu"))
as necessary.- NOTE11 OK, 2 NOTENow
- NOTE12 OK, 2 NOTE2026-03-10
Documentation
- Help pages
- 10
- Examples that run
- 100%1 run in a plain check
- Exported functions with examples
- 100%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 10%
Downloads
Dependencies
Installing mediateP adds no packages beyond those that come with R.
Code & Tests
People & History
Maintainer since 0.1.0 (2021)
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- RR 4.2.0 released · 2022-04-22
- 0.2.0Latest
- RR 4.1.0 released · 2021-05-18
- 0.1.02021-01-13
- RR 4.0.0 released · 2020-04-24
Package metadata
- First published
- 2021-01-13
- Total releases
- 2 / 5 yrs
- License
- GPL
- Minimum R
- ≥ 3.6.0
- Download size
- 9.5 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("mediateP")Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-22, which the citation names so these numbers can be found later. More on citing and the projects behind them.