The Toolkit for Weighting and Analysis of Nonequivalent Groups, or TWANG, contains a set of functions to support causal modeling of observational data through the estimation and evaluation of propensity score weights. The TWANG package was first developed in 2004 by RAND researchers for the R statistical computing language and environment. The R version of the package contains functions for creating high-quality propensity score weights which can be used to estimate treatment effects with two or more treatment groups.
In 2014, TWANG macros were developed for SAS and Stata to support the use of these tools without requiring researchers and analysts to learn R. At this time, the SAS TWANG macros can support estimation of propensity scores and their associated weights for comparisons involving two or more treatment groups. The Stata TWANG macros can support estimation of propensity scores and their associated weights for comparisons involving two treatment groups. Stata macros will be made available shortly for handling the case of three or more treatment groups.
The TWANG package was originally created after RAND researchers grew tired of spending too much time and effort trying to create the best set of propensity score weights using logistic regression. Determining which main effects, interactions, and higher-order terms should be included in the propensity score is typically challenging in application. The TWANG package implements Generalized Boosted Models (GBM) for estimation of propensity score weights. GBM estimates propensity scores and their associated weights using an automated, nonparametric machine learning technique that only requires the analyst to specify which pre-treatment covariates they would like to balance between the treatment groups. The algorithm (not the user) determines the most appropriate model for the propensity score.
How to start using TWANG
This site contains tutorials that describe the use of the TWANG package in R, SAS, and Stata, downloadable macros for the SAS and Stata environments, and links to related software available elsewhere. Combined, these resources are everything you need to begin using TWANG to create propensity score weights.
The TWANG project team has also created educational video tutorials which provide an overview to causal inference using propensity scores and step-by-step procedures for implementing propensity score weighted analyses involving two or more treatment groups using the TWANG data analysis package.
The TWANG project team has also been actively involved in giving workshops and short courses on causal inference using propensity scores. A list of upcoming courses can be viewed here. We will soon be hosting a webinar. For more information on participating in a webinar, contact the project team at firstname.lastname@example.org.
The TWANG package has been expanded, improved, and widely distributed with funding from grant 1R01DA034065 from the National Institute on Drug Abuse.
To reference these resources in other publications, please cite:
Beth Ann Griffin, Greg Ridgeway, Andrew R. Morral, Lane F. Burgette, Craig Martin, Daniel Almirall, Rajeev Ramchand, Lisa H. Jaycox, Daniel F. McCaffrey. Toolkit for Weighting and Analysis of Nonequivalent Groups (TWANG) Website. Santa Monica, CA: RAND Corporation, 2014. http://www.rand.org/statistics/twang.