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 16 Jul. 2026.
Previous versions and publish date:
(2026-07-09 07:15), 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

tibble  
Simple Data Frames
Provides a 'tbl_df' class (the 'tibble') with stricter checking and better formatting than the tradi ...
Download / Learn more Package Citations See dependency  
stevedata  
Steve's Toy Data for Teaching About a Variety of Methodological, Social, and Political Topics
This is a collection of various kinds of data with broad uses for teaching. My students, and academ ...
Download / Learn more Package Citations See dependency  
nextGenShinyApps  
Craft Exceptional 'R Shiny' Applications and Dashboards with Novel Responsive Tools
Nove responsive tools for designing and developing 'Shiny' dashboards and applications. The scripts ...
Download / Learn more Package Citations See dependency  
tarchetypes  
Archetypes for Targets
Function-oriented Make-like declarative pipelines for Statistics and data science are supported in t ...
Download / Learn more Package Citations See dependency  
schoolmath  
Functions and Datasets for Math Used in School
Contains functions and datasets for math taught in school. A main focus is set to prime-calculation. ...
Download / Learn more Package Citations See dependency  
bbdetection  
Identification of Bull and Bear States of the Market
Implements two algorithms of detecting Bull and Bear markets in stock prices: the algorithm of Pagan ...
Download / Learn more Package Citations See dependency  

27,806

R Packages

239,283

Dependencies

73,837

Author Associations

27,807

Publication Badges

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