Skip to content

twangMediation

Twang Causal Mediation Modeling via Weighting

v1.2.1 · Nov 16, 2025 · GPL-3

Description

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). <https://cepa.stanford.edu/sites/default/files/workshops/GH_JSM%20Proceedings%202010.pdf> 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.

Downloads

306

Last 30 days

13087th

795

Last 90 days

2.8K

Last year

Trend: +16.4% (30d vs prior 30d)

CRAN Check Status

14 OK
Show all 14 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-macos-arm64 OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK

Check History

OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026

Dependency Network

Dependencies Reverse dependencies twang gbm gridExtra lattice latticeExtra survey twangMediation

Version History

new 1.2.1 Mar 10, 2026
updated 1.2.1 ← 1.2 diff Nov 15, 2025
updated 1.2 ← 1.1 diff Aug 15, 2022
updated 1.1 ← 1.0 diff Dec 12, 2021
new 1.0 Jul 26, 2021