Package: regmedint 1.0.1

Yi Li

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

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.

Authors:Kazuki Yoshida [ctb, aut], Yi Li [cre, aut], Maya Mathur [ctb]

regmedint_1.0.1.tar.gz
regmedint_1.0.1.zip(r-4.5)regmedint_1.0.1.zip(r-4.4)regmedint_1.0.1.zip(r-4.3)
regmedint_1.0.1.tgz(r-4.4-any)regmedint_1.0.1.tgz(r-4.3-any)
regmedint_1.0.1.tar.gz(r-4.5-noble)regmedint_1.0.1.tar.gz(r-4.4-noble)
regmedint_1.0.1.tgz(r-4.4-emscripten)regmedint_1.0.1.tgz(r-4.3-emscripten)
regmedint.pdf |regmedint.html
regmedint/json (API)
NEWS

# Install 'regmedint' in R:
install.packages('regmedint', repos = c('https://kaz-yos.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/kaz-yos/regmedint/issues

Datasets:
  • vv2015 - Example dataset from Valeri and VanderWeele 2015.

On CRAN:

causal-inferencemediation-analysis

1 exports 26 stars 2.58 score 8 dependencies 2 mentions 40 scripts 328 downloads

Last updated 9 months agofrom:5c5270b6d6. Checks:OK: 1 NOTE: 6. Indexed: yes.

TargetResultDate
Doc / VignettesOKSep 04 2024
R-4.5-winNOTESep 04 2024
R-4.5-linuxNOTESep 04 2024
R-4.4-winNOTESep 04 2024
R-4.4-macNOTESep 04 2024
R-4.3-winNOTESep 04 2024
R-4.3-macNOTESep 04 2024

Exports:regmedint

Dependencies:assertthatDerivlatticeMASSMatrixsandwichsurvivalzoo

Implementation of extended formulas when there are effect measure modifiers

Rendered fromvig_05_emm.Rmdusingknitr::rmarkdownon Sep 04 2024.

Last update: 2022-02-18
Started: 2022-02-03

Implementation of formulas

Rendered fromvig_02_formulas.Rmdusingknitr::rmarkdownon Sep 04 2024.

Last update: 2021-05-11
Started: 2020-04-26

Introduction to user interface functions

Rendered fromvig_01_introduction.Rmdusingknitr::rmarkdownon Sep 04 2024.

Last update: 2022-02-03
Started: 2020-04-26

Using bootstrapping with regemedint

Rendered fromvig_03_bootstrap.Rmdusingknitr::rmarkdownon Sep 04 2024.

Last update: 2021-05-11
Started: 2020-04-26

Using multiple imputation with regmedint

Rendered fromvig_04_mi.Rmdusingknitr::rmarkdownon Sep 04 2024.

Last update: 2021-05-11
Started: 2020-04-26

Validation of extended formuals with effect modification using bootstrap

Rendered fromvig_06_delta_boot.Rmdusingknitr::rmarkdownon Sep 04 2024.

Last update: 2022-03-11
Started: 2022-02-03

Readme and manuals

Help Manual

Help pageTopics
Create a vector of coefficients from the mediator model (mreg)beta_hat
Return mediation analysis functions given mediator and outcome models specifications.calc_myreg
Create calculators for effects and se (mreg linear / yreg linear)calc_myreg_mreg_linear_yreg_linear
Create calculators for effects and se (mreg linear / yreg logistic)calc_myreg_mreg_linear_yreg_logistic
Create calculators for effects and se (mreg logistic / yreg linear)calc_myreg_mreg_logistic_yreg_linear
Create calculators for effects and se (mreg logistic / yreg logistic)calc_myreg_mreg_logistic_yreg_logistic
Extract point estimates.coef.regmedint
Extract the result matrix from a summary_regmedint object.coef.summary_regmedint
Confidence intervals for mediation prameter estimates.confint.regmedint
Fit a model for the mediator given the treatment and covariates.fit_mreg
Fit a model for the outcome given the treatment, mediator, and covariates.fit_yreg
Calculate the gradient of the proportion mediated for yreg linear.grad_prop_med_yreg_linear
Calculate the gradient of the proportion mediated for yreg logistic.grad_prop_med_yreg_logistic
Low level constructor for a regmedint S3 class object.new_regmedint
print method for regmedint objectprint.regmedint
Print method for summary objects from 'summary.regmedint'print.summary_regmedint
Calculate the proportion mediated for yreg linear.prop_med_yreg_linear
Calculate the proportion mediated for yreg logistic.prop_med_yreg_logistic
regmedint: A package for regression-based causal mediation analysisregmedint
Report variables with missing datareport_missing
summary method for regmedint objectsummary.regmedint
Summary with robust sandwich variance estimator for modified Poissonsummary.regmedint_mod_poisson
Create a vector of coefficients from the outcome model (yreg)theta_hat
Validate arguments to regmedint before passing to other functionsvalidate_args
Validate soundness of a regmedint object.validate_regmedint
Extract variance estimates in the vcov form.vcov.regmedint
Robust sandwich variance estimator for modified Poissonvcov.regmedint_mod_poisson
Example dataset from Valeri and VanderWeele 2015.vv2015