regmedint
1.0.2Regression-Based Causal Mediation Analysis with Interaction and Effect Modification Terms
Overview
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
- OK2026-06-0913 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
- ERROR2026-06-0712 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
- OK2026-03-1013 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
Documentation
- Examples that run
- 100%
- Documented parameters
- 100%
- Return-value docs
- 100%
- References docs
- 0%
Downloads
Repository
Stars over time
Forks over time
Issues over time
PRs over time
Repository practices
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.
Dependencies
Code & Tests
- 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
Call graph
Open call graph →Lowest coverage
45 functions| Function | Cyclo | Coverage |
|---|---|---|
| prop_med_yreg_linear | 1 | 0% |
| prop_med_yreg_logistic | 1 | 0% |
| theta_hat | 13 | 56% |
| summary.regmedint_mod_poisson | 11 | 67% |
| Sigma_theta_hat | 7 | 82% |
| calc_myreg_mreg_linear_yreg_linear_est | 6 | 90% |
Datasets
| Name | Class | Rows × Cols | Also ships in |
|---|---|---|---|
| vv2015 | spec_tbl_df/tbl_df/tbl/data.frame | 100 × 7 | – |
People & History
6 releases. Pick two to compare their code metrics. R releases are shown for context.
- RR 4.6.0 released · 2026-04-24
- 1.0.2Latest
- unarchivedReturned to CRAN2026-03-06
- archivedRemoved from CRAN2025-12-22issues were not corrected despite reminders
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- 1.0.12024-01-13 · diff ↗
- RR 4.3.0 released · 2023-04-21
- RR 4.2.0 released · 2022-04-22
- 1.0.02022-04-06 · diff ↗
- RR 4.1.0 released · 2021-05-18
- 0.2.12021-05-12 · diff ↗
- 0.2.02020-11-16 · diff ↗
- 0.1.02020-05-11
- RR 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