Software

localIV: Estimation of Marginal Treatment Effects using Local Instrumental Variables

In the generalized Roy model, the marginal treatment effect (MTE) can be used as a building block for constructing conventional causal parameters such as the average treatment effect (ATE) and the average treatment effect on the treated (ATT) (Heckman, Urzua, and Vytlacil 2006). Given a treatment selection model and an outcome model, the function mte() estimates the MTE via local instrumental variables (or via a normal... Read more about localIV: Estimation of Marginal Treatment Effects using Local Instrumental Variables

paths: An Imputation Approach to Estimating Path-Specific Causal Effects

In causal mediation analysis with multiple causally ordered mediators, a set of path-specific effects are identified under standard ignorability assumptions. This package implements an imputation approach to estimating these effects along with a set of bias formulas for conducting sensitivity analysis (Zhou and Yamamoto <doi:10.31235/osf.io/2rx6p>). It contains two main functions: paths() for estimating path-specific effects and sens() for conducting sensitivity analysis. Estimation uncertainty is quantified using the nonparametric... Read more about paths: An Imputation Approach to Estimating Path-Specific Causal Effects

rbw: Implementation of Residual Balancing Weights for Marginal Structural Models

An R package implementing residual balancing weights for marginal structural models, which can be used to estimate marginal effects of time-varying treatments and also controlled direct/mediator effects in causal mediation analysis (Zhou and Wodtke 2020). This package provides two functions, rbwPanel() and rbwMed(), that produce residual balancing weights for analyses of time-varying treatments and causal mediation respectively. Available at ... Read more about rbw: Implementation of Residual Balancing Weights for Marginal Structural Models

rwrmed: Regression-with-residuals (RWR) Analysis of Causal Mediation.

This packages implements the regression-with-residuals (RWR) approach to causal mediation analysis, allowing for post-treatment confounding of the mediator-outcome relationship (Zhou and Wodtke 2019; Wodtke and Zhou 2019). The rwrmed() function fits user-specified mediator and outcome models with residualized post-treatment confounders. The decomp() function implements a two-component...

Read more about rwrmed: Regression-with-residuals (RWR) Analysis of Causal Mediation.

strat: An Implementation of the Stratification Index

An R package implementing the stratification index (Zhou 2012). The package provides two functions, srank(), which returns stratum-specific information, including population share and average percentile rank; and strat(), which returns the stratification index and its approximate standard error. When a grouping factor is specified, strat also provides a detailed decomposition of the overall... Read more about strat: An Implementation of the Stratification Index