Frequently Asked Questions
- What is the purpose of TWANG?
- What is a "propensity score"?
- How is a propensity score used in practice?
- What are "pretreatment covariates"?
- How do I install the TWANG package?
- What is R?
- What is SAS?
- What is Stata?
- Do I need to be an R user to use TWANG?
- How can I stay up to date on the latest tools being produce by the TWANG development team?
What is the purpose of TWANG?
TWANG is intended to aid in the creation of propensity score weights for use in estimating causal effects with observational data. While randomized control trials provide the gold standard for estimation of treatment effects by allowing researchers to isolate and study the effect of a particular treatment, randomized trials are not feasible in many settings. Further, even when randomized trials are possible, data from randomized trials are often used to address secondary or tertiary aims which are observational (e.g., causal mediation or the effect of complying with an assigned treatment).
Statistical tools, such as the TWANG package, can be used in settings like these to reduce the effects of confounding bias from observed pre-treatment covariates.
What is a "propensity score"?
The propensity score is the probability that an individual is assigned to (or received) a specific treatment condition or exposure given a set of observed covariates. Propensity scores can be used to reduce bias in treatment effect estimates by helping to balance different treatment or exposure groups on the observed covariates used in the propensity score model. Through a single number, propensity scores summarize all potential (measured) confounders into one score, making it easier to prevent confounding bias from these measures in the estimation of treatment effects.
How is a propensity score used in practice?
In many studies, it is not possible to randomize individuals or units to the treatment conditions being compared. Sometimes researchers only have observational data available to address questions about the relative effectiveness of two or more treatment conditions. In these cases, individuals in one treatment condition may look very different from individuals in the other treatment condition or conditions. For example, individuals in one group may be younger, have more severe problems, or engage in more risky behaviors before potential exposure to the treatment. The propensity score (the conditional probability that an individual is placed in a particular treatment group given an observed set of pretreatment covariates) can be used to weight the groups so that they (ideally) balance on as many observed pretreatment covariates as go into to the propensity score model of the treatment indicator.
RAND researchers described the use of propensity scores in a 2004 paper that used as an example the evaluation of the Phoenix Academy of Los Angeles. For this evaluation, researchers looked at the 12-month post-treatment outcomes of adolescents who'd been part of programs at the Phoenix Academy (a therapeutic community for adolescents), and compared them to the outcomes of individuals in similar circumstances who had been a part of other treatment programs. Participation in these programs was not random, and youth in the Phoenix Academy group looked very different from youth in the other treatment programs.
The paper describes a process in which 41 pretreatment covariates were used in the estimation of propensity score weights that balanced youth in the Phoenix Academy with youth in the other treatment programs. These weights were then used to examine propensity score weighted mean substance use and other outcomes at 12-months post-intake to determine if youth in Phoenix Academy were faring better or worse than youth with similar backgrounds.
What are "pretreatment covariates"?
Pretreatment covariates are other factors that can vary between individuals in the treatment conditions and are measured prior to individuals receiving the particular treatment condition they did. Examples might include age, gender, race/ethnicity, or prior substance use. Pretreatment covariates are the measures upon which analysts and researchers aim to balance their treatment groups. They are measured or observed for individuals in all the treatment conditions before exposure to treatment.
How do I install the TWANG package?
To use the tools in the TWANG package, you'll need to install R. Instructions on doing so can be found at the R Project website:
Then, you can use TWANG either through R, or through SAS and Stata using a macro (available on the Downloads page).
What is R?
R is a language and environment for statistical computing and graphics. R is an open-source project, and is managed and developed by a group of volunteers. You can download R and documentation on its use from the R Project website.
What is SAS?
SAS is a software package for statistical analysis, and also a company that produces software (The SAS Institute). SAS originally stood for "Statistical Analysis System," but is now a piece of software called simply "SAS." (reference)
What is Stata?
Do I need to be an R user to use TWANG?
You can use the TWANG functions in either Stata or SAS, but R must still be installed to use TWANG in SAS or Stata. TWANG for SAS and Stata uses macros that require R even though all interaction is done through the SAS or Stata interfaces.
How can I stay up to date on the latest tools being produce by the TWANG development team?
You can stay up to date on the latest tools by signing up to "Stay Informed" (see top right) and sharing your email address with the development team. This will allow you to receive notification of updates to the TWANG package or new research on the methodology used by TWANG. TWANG development is funded through grants from the National Institute on Drug Abuse. A requirement for continued funding is evidence of successful dissemination of the TWANG package and its supporting materials. By registering to "Stay Informed," you will contribute to the required evidence and help to ensure the continued development and improvement of the TWANG package. We would greatly appreciate it if you signed up to "Stay Informed."