Toolkit for Weighting and Analysis of Nonequivalent Groups

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

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

Full Document

FormatFile SizeNotes
PDF file 6.5 MB

Use Adobe Acrobat Reader version 10 or higher for the best experience.

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.

Table of Contents

  • Chapter One

    Introduction

  • Chapter Two

    Setting Up

  • Chapter Three

    Treatment Assignment Models

  • Chapter Four

    Evaluating the Quality of the IPTW

  • Chapter Five

    Analysis of Outcomes

  • Chapter Six

    Data Outputs

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 report is part of the RAND Corporation Tool series. RAND tools may include models, databases, calculators, computer code, GIS mapping tools, practitioner guidelines, web applications, and various toolkits. 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.

Permission is given to duplicate this electronic document for personal use only, as long as it is unaltered and complete. Copies may not be duplicated for commercial purposes. Unauthorized posting of RAND PDFs to a non-RAND Web site is prohibited. RAND PDFs are protected under copyright law. For information on reprint and linking permissions, please visit the RAND Permissions page.

The RAND Corporation 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.