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

CRAN

376

Last 30 days

11124th

838

Last 90 days

3.1K

Last year

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

r2u CRAN

0

Last 30 days

26

Last 90 days

135

Last year

Trend: -100% (30d vs prior 30d)

autoCRAN

1

Last 7 days

17

Last 30 days

0

All-time

autoCRAN-only: this name is served only by autoCRAN, so the count is exact.

CRAN Check Status

13 OK
Show all 13 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-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

Code

Code metrics have not been computed for this package yet.

Dependency Network

Dependencies Reverse dependencies twang gbm gridExtra lattice latticeExtra survey twangMediation

Version History

5 tracked
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