twangMediation: Twang Causal Mediation Modeling via Weighting

Provides functions for estimating natural direct and indirect effects for mediation analysis. It uses weighting where the weights are functions of estimates of the probability of exposure or treatment assignment (Hong, G (2010). <> Huber, M. (2014). <doi:10.1002/jae.2341>). Estimation of probabilities can use generalized boosting or logistic regression. Additional functions provide diagnostics of the model fit and weights. The vignette provides details and examples.

Version: 1.0
Depends: R (≥ 2.10)
Imports: twang, gbm (≥ 1.5-3), gridExtra, graphics, stats, lattice, latticeExtra, survey
Suggests: knitr
Published: 2021-07-27
Author: Dan McCaffrey [aut, cre], Katherine Castellano [aut], Donna Coffman [aut], Brian Vegetabile [aut], Megan Schuler [aut], Haoyu Zhou [aut]
Maintainer: Dan McCaffrey <dmccaffrey at>
License: GPL-3
NeedsCompilation: no
CRAN checks: twangMediation results


Reference manual: twangMediation.pdf
Vignettes: A tutorial for conducting causal mediation analysis with the twangMediation package


Package source: twangMediation_1.0.tar.gz
Windows binaries: r-devel:, r-release:, r-oldrel:
macOS binaries: r-release (arm64): twangMediation_1.0.tgz, r-release (x86_64): twangMediation_1.0.tgz, r-oldrel: twangMediation_1.0.tgz


Please use the canonical form to link to this page.