Package: twangMediation 1.2

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). <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.

Authors:Dan McCaffrey [aut, cre], Katherine Castellano [aut], Donna Coffman [aut], Brian Vegetabile [aut], Megan Schuler [aut], Haoyu Zhou [aut]

twangMediation_1.2.tar.gz
twangMediation_1.2.zip(r-4.5)twangMediation_1.2.zip(r-4.4)twangMediation_1.2.zip(r-4.3)
twangMediation_1.2.tgz(r-4.5-any)twangMediation_1.2.tgz(r-4.4-any)twangMediation_1.2.tgz(r-4.3-any)
twangMediation_1.2.tar.gz(r-4.5-noble)twangMediation_1.2.tar.gz(r-4.4-noble)
twangMediation_1.2.tgz(r-4.4-emscripten)twangMediation_1.2.tgz(r-4.3-emscripten)
twangMediation.pdf |twangMediation.html
twangMediation/json (API)

# Install 'twangMediation' in R:
install.packages('twangMediation', repos = c('https://danielmc1603.r-universe.dev', 'https://cloud.r-project.org'))
Datasets:
  • NSDUH_female - A dataset containing the substance use condition and sexual orientation of 40293 women respondents to the 2017 & 2018 National Survey of Drug Use and Health.
  • tMdat - Simulated data for twangMediation

On CRAN:

Conda-Forge:

This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.

2.00 score 192 downloads 3 exports 49 dependencies

Last updated 3 years agofrom:6b4bf6ec73. Checks:5 OK, 3 NOTE. Indexed: yes.

TargetResultLatest binary
Doc / VignettesOKFeb 11 2025
R-4.5-winNOTEFeb 11 2025
R-4.5-macNOTEFeb 11 2025
R-4.5-linuxNOTEFeb 11 2025
R-4.4-winOKFeb 11 2025
R-4.4-macOKFeb 11 2025
R-4.3-winOKFeb 11 2025
R-4.3-macOKFeb 11 2025

Exports:bal.table.mediationdesc.effectswgtmed

Dependencies:clicolorspacedata.tableDBIdeldirfansifarvergbmggplot2gluegtableinterpisobandjpegjsonlitelabelinglatticelatticeExtralifecyclemagrittrMASSMatrixMatrixModelsmgcvminqamitoolsmunsellnlmenumDerivpillarpkgconfigpngR6RColorBrewerRcppRcppArmadilloRcppEigenrlangscalessurveysurvivaltibbletwangutf8vctrsviridisLitewithrxgboostxtable

A tutorial for conducting causal mediation analysis with the twangMediation package

Rendered fromtwangMediation.Rnwusingutils::Sweaveon Feb 11 2025.

Last update: 2022-08-16
Started: 2022-08-16