Skip to content

mediateP

Mediation Analysis Based on the Product Method

v0.2.0 · Feb 4, 2022 · GPL

Description

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.

Downloads

CRAN

268

Last 30 days

18133rd

627

Last 90 days

2.5K

Last year

Trend: +70.7% (30d vs prior 30d)

r2u CRAN

0

Last 30 days

23

Last 90 days

97

Last year

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

autoCRAN

1

Last 7 days

4

Last 30 days

1

All-time

autoCRAN-only: this name is served only by autoCRAN, so the count is exact.

CRAN Check Status

2 NOTE
11 OK
Show all 13 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang NOTE
r-devel-linux-x86_64-debian-gcc NOTE
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc 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 details (2 non-OK)
NOTE r-devel-linux-x86_64-debian-clang

CRAN incoming feasibility

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.
NOTE r-devel-linux-x86_64-debian-gcc

CRAN incoming feasibility

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.

Check History

NOTE 12 OK · 2 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026
NOTE r-devel-linux-x86_64-debian-clang

CRAN incoming feasibility

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.
NOTE r-devel-linux-x86_64-debian-gcc

CRAN incoming feasibility

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.

Code

Structure

Lines of code

2,042

Files

14

Compiled share

0%

Has compiled src

No

Language breakdown

R 1,558 (76.3%)Docs 484 (23.7%)

API

Exported functions

10

Internal functions

0

Recent export changes

v0.1.0+2 pattern:^[[:alpha:]]+, mediate

Testing & CI

Has tests

No

Test-to-code ratio

0.00

testthat edition

CI present

No

CI type

[]

PR gated

No

Docs

Return-value doc rate

100%

\dontrun example ratio

0%

Roxygen coverage

100%

Has pkgdown

No

NEWS present

No

Health & Security signals

Informational signals; not verdicts.

on.exit coverage

Unsafe pattern score

36

Dep constraint coverage

0%

Secret pattern count

0

Bundled 3rd-party code

2 items

Portability & License

Min R version

3.6.0

System requirements

C++ standard

License

GPL

License flags

not SPDX, not OSI

History

Versions

2

First release

2021-01-13

Latest release

2022-02-04

Avg cadence

387 days

Cold removal rate

Dep drift

0

LOC over versions

v0.1.0: 2,147 LOCv0.2.0: 2,042 LOC

Per-file churn detail lives in the source pipeline: https://github.com/r-observatory/cran-code-metrics.

Dependency Network

Dependencies Reverse dependencies boot mediateP

Version History

3 tracked
new 0.2.0 Mar 10, 2026
updated 0.2.0 ← 0.1.0 diff Feb 4, 2022
new 0.1.0 Jan 12, 2021