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 26 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

poptrend  
Estimate Smooth and Linear Trends from Population Count Survey Data
Functions to estimate and plot smooth or linear population trends, or population indices, from anim ...
Download / Learn more Package Citations See dependency  
quickcode  
Quick and Essential 'R' Tricks for Better Scripts
The NOT functions, 'R' tricks and a compilation of some simple quick plus often used 'R' codes to im ...
Download / Learn more Package Citations See dependency  
tactile  
New and Extended Plots, Methods, and Panel Functions for 'lattice'
Extensions to 'lattice', providing new high-level functions, methods for existing functions, panel f ...
Download / Learn more Package Citations See dependency  
infotheo  
Information-Theoretic Measures
Implements various measures of information theory based on several entropy estimators. ...
Download / Learn more Package Citations See dependency  
colormap  
Color Palettes using Colormaps Node Module
Allows to generate colors from palettes defined in the colormap module of 'Node.js'. (see ...
Download / Learn more Package Citations See dependency  
PoisBinOrdNor  
Data Generation with Poisson, Binary, Ordinal and Normal Components
Generation of multiple count, binary, ordinal and normal variables simultaneously given the marginal ...
Download / Learn more Package Citations See dependency  

27,535

R Packages

236,180

Dependencies

73,223

Author Associations

27,536

Publication Badges

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