Learn R Programming

regmedint (version 1.0.1)

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

Description

This is an extension of the regression-based causal mediation analysis first proposed by Valeri and VanderWeele (2013) and Valeri and VanderWeele (2015) ). 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) . 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.

Copy Link

Version

Install

install.packages('regmedint')

Monthly Downloads

428

Version

1.0.1

License

GPL-2

Maintainer

Yi Li

Last Published

January 13th, 2024

Functions in regmedint (1.0.1)

vcov.regmedint

Extract variance estimates in the vcov form.
validate_regmedint

Validate soundness of a regmedint object.
new_regmedint

Low level constructor for a regmedint S3 class object.
beta_hat

Create a vector of coefficients from the mediator model (mreg)
prop_med_yreg_linear

Calculate the proportion mediated for yreg linear.
calc_myreg

Return mediation analysis functions given mediator and outcome models specifications.
prop_med_yreg_logistic

Calculate the proportion mediated for yreg logistic.
theta_hat

Create a vector of coefficients from the outcome model (yreg)
validate_args

Validate arguments to regmedint before passing to other functions
fit_yreg

Fit a model for the outcome given the treatment, mediator, and covariates.
grad_prop_med_yreg_linear

Calculate the gradient of the proportion mediated for yreg linear.
fit_mreg

Fit a model for the mediator given the treatment and covariates.
coef.regmedint

Extract point estimates.
coef.summary_regmedint

Extract the result matrix from a summary_regmedint object.
calc_myreg_mreg_logistic_yreg_linear

Create calculators for effects and se (mreg logistic / yreg linear)
confint.regmedint

Confidence intervals for mediation prameter estimates.
calc_myreg_mreg_logistic_yreg_logistic

Create calculators for effects and se (mreg logistic / yreg logistic)
calc_myreg_mreg_linear_yreg_logistic

Create calculators for effects and se (mreg linear / yreg logistic)
calc_myreg_mreg_linear_yreg_linear

Create calculators for effects and se (mreg linear / yreg linear)
grad_prop_med_yreg_logistic

Calculate the gradient of the proportion mediated for yreg logistic.
report_missing

Report variables with missing data
regmedint

regmedint: A package for regression-based causal mediation analysis
print.summary_regmedint

Print method for summary objects from summary.regmedint
print.regmedint

print method for regmedint object
vcov.regmedint_mod_poisson

Robust sandwich variance estimator for modified Poisson
vv2015

Example dataset from Valeri and VanderWeele 2015.
summary.regmedint_mod_poisson

Summary with robust sandwich variance estimator for modified Poisson
summary.regmedint

summary method for regmedint object