Skip to content

regmedint

1.0.2

Regression-Based Causal Mediation Analysis with Interaction and Effect Modification Terms

1packages depend
7.4Kdownloads / year
92.9%test coverage
13/13checks pass

Overview

About
Maintained by Yi LiFirst published 2020-05-116 releasesCRAN page ↗GitHub ↗

This is an extension of the regression-based causal mediation analysis first proposed by Valeri and VanderWeele (2013) doi:10.1037/a0031034 and Valeri and VanderWeele (2015) doi:10.1097/EDE.0000000000000253). It supports including effect measure modification by covariates(treatment-covariate and mediator-covariate product terms in mediator and outcome regression models) as proposed by Li et al (2023) doi:10.1097/EDE.0000000000001643. It also accommodates the original 'SAS' macro and 'PROC CAUSALMED' procedure in 'SAS' when there is no effect measure modification. Linear and logistic models are supported for the mediator model. Linear, logistic, loglinear, Poisson, negative binomial, Cox, and accelerated failure time (exponential and Weibull) models are supported for the outcome model.

Install

Health

CRAN checks
13OK
Slowest check: 5.3 min · r-devel-linux-x86_64-fedora-clang
Code health
Yes
Tests · ratio 17.01
92.9%
Coverage · measured lines
100%
Documentation · exports
6
Dependencies · direct
Check history
  • OK2026-06-09
    13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • ERROR2026-06-07
    12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
  • OK2026-03-10
    13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE

Documentation

Documentation
READMENoVignettesYes · dynamicpkgdown siteNoNEWSYes · 100% structuredCode of conductNoContributing guideNo
Examples that run
100%
Documented parameters
100%
Return-value docs
100%
References docs
0%

Downloads

7.4K
CRAN downloads in the past year
Rank #3,930 · ~20/day · ~617/mo
Daily download trend is not available in this view yet.
68530 days
2.6K90 days
7.4K1 year
Compare downloads with other packages →
Also on108 r2u36 autocran36 c2d4u

Repository

Repository
36Stars
9Forks
2Open issues
0Open PRs
0Releases
1,121Commits
7Contributors
causal-inferencemediation-analysis
1,121 commits · Last activity 2026-03-06 · 0% stars, 30d

Stars over time

2025-04-22 · 302026-07-07 · 36

Repository practices

Upstream repositoryBeta

4 development-tooling and community-health practices detected across 3 families in the upstream repository

Checks run against github.com/kaz-yos/regmedint on 2026-07-19.

Continuous integration (1)
GitHub Actions
Reproducibility and dev environment (2)
data-raw/Makefile
Docs source (1)
README.Rmd
How this is detected·Detection ruleset v1 (2026-07-18)

Dependencies

Declared dependencies
19 external dependencies (excludes base and recommended)
Depends (1)
R >= 2.10
Imports (6)
DerivMASSMatrixassertthatsandwichsurvival
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
1direct
0indirect

Code & Tests

Code Composition
Other 62,041 (74%)R 19,169 (23%)Rd 1,302 (2%)Vignettes 1,161 (1%)
Code characteristics
Object systems
S37
Cyclomatic complexity
4.0 median / 17 max
Test cases
848 / 17.01 per code line

Test coverage

Line coverage

93%

Expression

88.2%

Tests / Examples

92.9% / 43% ex

Functions

45 2 exported

Complexity

5 avg / 17 max

Call network

45 nodes / 59 edges

Loading call graph…

Lowest coverage

45 functions
FunctionCycloCoverage
prop_med_yreg_linear10%
prop_med_yreg_logistic10%
theta_hat1356%
summary.regmedint_mod_poisson1167%
Sigma_theta_hat782%
calc_myreg_mreg_linear_yreg_linear_est690%

Datasets

Bundled datasets · 1
NameClassRows × ColsAlso ships in
vv2015spec_tbl_df/tbl_df/tbl/data.frame100 × 7

People & History

People (3)
Maintainer (1)
Maintainer, Author · added in 0.2.0
Authors (2)
Maintainer, Author · added in 0.2.0
Contributor, Author
Contributors (2)
Contributor, Author
Contributor
Package Timeline

6 releases. Pick two to compare their code metrics. R releases are shown for context.

  • R
    R 4.6.0 released · 2026-04-24
  • 1.0.2Latest
    2026-03-06 · current release · diff ↗
  • unarchivedReturned to CRAN
    2026-03-06
  • archivedRemoved from CRAN
    2025-12-22
    issues were not corrected despite reminders
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • 1.0.1
    2024-01-13 · diff ↗
  • R
    R 4.3.0 released · 2023-04-21
  • R
    R 4.2.0 released · 2022-04-22
  • 1.0.0
    2022-04-06 · diff ↗
  • R
    R 4.1.0 released · 2021-05-18
  • 0.2.1
    2021-05-12 · diff ↗
  • 0.2.0
    2020-11-16 · diff ↗
  • 0.1.0
    2020-05-11
  • R
    R 4.0.0 released · 2020-04-24

Package metadata

First published
2020-05-11
Total releases
6 / 6 yrs
License
GPL-2 OSI
Minimum R
≥ 2.10
Bundled data
2.4 KB / 1 file
Download size
516 KB
Installed size
not tracked yet
With dependencies
not tracked yet
Appears in task views
Report a problem with this page →