Other packages > Find by keyword >

twangMediation  

Twang Causal Mediation Modeling via Weighting
View on CRAN: Click here


Download and install twangMediation package within the R console
Install from CRAN:
install.packages("twangMediation")

Install from Github:
library("remotes")
install_github("cran/twangMediation")

Install by package version:
library("remotes")
install_version("twangMediation", "1.2.1")



Attach the package and use:
library("twangMediation")
Maintained by
Dan McCaffrey
[Scholar Profile | Author Map]
All associated links for this package
First Published: 2021-07-27
Latest Update: 2025-09-01
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.
How to cite:
Dan McCaffrey (2021). twangMediation: Twang Causal Mediation Modeling via Weighting. R package version 1.2.1, https://cran.r-project.org/web/packages/twangMediation. Accessed 06 Jun. 2026.
Previous versions and publish date:
1.0 (2021-07-27 10:50), 1.1 (2021-12-13 15:40), 1.2 (2022-08-16 13:50)
Other packages that cited twangMediation R package
View twangMediation citation profile
Other R packages that twangMediation depends, imports, suggests or enhances
Complete documentation for twangMediation
Downloads during the last 30 days

Today's Hot Picks in Authors and Packages

worrrd  
Generate Wordsearch and Crossword Puzzles
Generate wordsearch and crossword puzzles using custom lists of words (and clues).Make them easy or ...
Download / Learn more Package Citations See dependency  
IAPWS95  
Thermophysical Properties of Water and Steam
An implementation of the International Association for the Properties of Water (IAPWS) Formulation ...
Download / Learn more Package Citations See dependency  
odbc  
Connect to ODBC Compatible Databases (using the DBI Interface)
A DBI-compatible interface to ODBC databases. ...
Download / Learn more Package Citations See dependency  
rwavelet  
Wavelet Analysis
Perform wavelet analysis (orthogonal,translation invariant, tensorial, 1-2-3d transforms, thresholdi ...
Download / Learn more Package Citations See dependency  
BALLI  
Expression RNA-Seq Data Analysis Based on Linear Mixed Model
Analysis of gene expression RNA-seq data using Bartlett-Adjusted Likelihood-based LInear model (BALL ...
Download / Learn more Package Citations See dependency  
r2resize  
In-Text Resize for Images, Tables and Fancy Resize Containers in 'shiny', 'rmarkdown' and 'quarto' Documents
Automatic resizing toolbar for containers, images and tables. Various resizable or expandable contai ...
Download / Learn more Package Citations See dependency  

27,268

R Packages

233,548

Dependencies

72,820

Author Associations

27,205

Publication Badges

© Copyright since 2022. All right reserved, rpkg.net.  Based in Cambridge, Massachusetts, USA