Toolkit for Weighting and Analysis of Nonequivalent Groups

A Tutorial on the TWANG Shiny Application for Time-Varying Treatments

Beth Ann Griffin, Ricardo Sanchez, Christopher E. Maerzluft, Matthew Cefalu, Lane F. Burgette, Daniel F. McCaffrey

ToolPublished May 14, 2021

This tool describes how to use a menu-driven Shiny application (app) based on the Toolkit for Weighting and Analysis of Nonequivalent Groups (TWANG) R package. The TWANG package was first developed in 2004 by RAND Corporation researchers for the R statistical computing language and environment. The RAND team has now developed interactive, menu-driven apps of the original TWANG functions using the Shiny software development package. Shiny is an R package that makes it easy to build interactive web apps straight from R.

This tutorial provides an introduction on how to use our TWANG Shiny app for time-varying treatments. The tutorial demonstrates use of the Shiny app through an illustrative example and explains key inputs and outputs of the TWANG Shiny app for time-varying treatments. More specifically, it provides an introduction about how to use the TWANG Shiny app for time-varying treatments to estimate the inverse probability of treatment weights (IPTW) for time-varying treatments when using observational data and to calculate treatment effect estimates using those IPTW.

Topics

Document Details

Citation

RAND Style Manual
Griffin, Beth Ann, Ricardo Sanchez, Christopher E. Maerzluft, Matthew Cefalu, Lane F. Burgette, and Daniel F. McCaffrey, Toolkit for Weighting and Analysis of Nonequivalent Groups: A Tutorial on the TWANG Shiny Application for Time-Varying Treatments, RAND Corporation, TL-A570-4, 2021. As of September 11, 2024: https://www.rand.org/pubs/tools/TLA570-4.html
Chicago Manual of Style
Griffin, Beth Ann, Ricardo Sanchez, Christopher E. Maerzluft, Matthew Cefalu, Lane F. Burgette, and Daniel F. McCaffrey, Toolkit for Weighting and Analysis of Nonequivalent Groups: A Tutorial on the TWANG Shiny Application for Time-Varying Treatments. Santa Monica, CA: RAND Corporation, 2021. https://www.rand.org/pubs/tools/TLA570-4.html.
BibTeX RIS

Research conducted by

This research was funded by the National Institute on Drug Abuse and conducted by the Justice Policy Program within RAND Social and Economic Well-Being.

This publication is part of the RAND tool series. RAND tools include models, databases, calculators, computer code, GIS mapping tools, practitioner guidelines, web applications, and various other toolkits and applied research products. All RAND tools undergo rigorous peer review to ensure both high data standards and appropriate methodology in keeping with RAND's commitment to quality and objectivity.

This document and trademark(s) contained herein are protected by law. This representation of RAND intellectual property is provided for noncommercial use only. Unauthorized posting of this publication online is prohibited; linking directly to this product page is encouraged. Permission is required from RAND to reproduce, or reuse in another form, any of its research documents for commercial purposes. For information on reprint and reuse permissions, please visit www.rand.org/pubs/permissions.

RAND is a nonprofit institution that helps improve policy and decisionmaking through research and analysis. RAND's publications do not necessarily reflect the opinions of its research clients and sponsors.