All functions

beta_hat()

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

calc_myreg()

Return mediation analysis functions given mediator and outcome models specifications.

calc_myreg_mreg_linear_yreg_linear()

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

calc_myreg_mreg_linear_yreg_logistic()

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

calc_myreg_mreg_logistic_yreg_linear()

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

calc_myreg_mreg_logistic_yreg_logistic()

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

coef(<regmedint>)

Extract point estimates.

coef(<summary_regmedint>)

Extract the result matrix from a summary_regmedint object.

confint(<regmedint>)

Confidence intervals for mediation prameter estimates.

fit_mreg()

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

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.

grad_prop_med_yreg_logistic()

Calculate the gradient of the proportion mediated for yreg logistic.

new_regmedint()

Low level constructor for a regmedint S3 class object.

print(<regmedint>)

print method for regmedint object

print(<summary_regmedint>)

Print method for summary objects from summary.regmedint

prop_med_yreg_linear()

Calculate the proportion mediated for yreg linear.

prop_med_yreg_logistic()

Calculate the proportion mediated for yreg logistic.

regmedint()

regmedint: A package for regression-based causal mediation analysis

report_missing()

Report variables with missing data

summary(<regmedint>)

summary method for regmedint object

summary(<regmedint_mod_poisson>)

Summary with robust sandwich variance estimator for modified Poisson

theta_hat()

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

validate_args()

Validate arguments to regmedint before passing to other functions

validate_regmedint()

Validate soundness of a regmedint object.

vcov(<regmedint>)

Extract variance estimates in the vcov form.

vcov(<regmedint_mod_poisson>)

Robust sandwich variance estimator for modified Poisson

vv2015

Example dataset from Valeri and VanderWeele 2015.