Software

Parametric g-formula

The parametric g-formula (Robins, 1986) uses longitudinal data with time-varying treatments and confounders to estimate the risk or mean of an outcome under hypothetical treatment strategies specified by the user. You can download software, documentation, and sample code for R and SAS.

  • R – gfoRmula package
  • SAS – GFORMULA macro
  • SAS – GFORMULA_RCT macro to estimate the per-protocol effect in randomized trials with protocol deviations
  • R, SAS – g-foRmula-benchmark to compare the R and SAS versions of our software

Inverse Probability Weighting of Marginal Structural Cox Models

  • SAS – MSM macros to estimate the parameters of a marginal structural Cox model and estimate risk under hypothetical static interventions (requires SAS IML)
  • SAS – INITIATORS macro to estimate the the observational analogs of the intention-to-treat and per-protocol effects of hypothetical treatment stategies
  • SAS – Sample program to estimate the parameter of a marginal structural Cox model. An earlier version of this program appeared in the appendix of Hernán, Brumback, and Robins (2000). This article shows how to use STATA to do the same thing.

G-estimation of Structural Nested Models

  • SAS – SNCFTM macro implements g-estimation of the parameters of a Structural Nested Cumulative Failure Time Model, and estimation of risk under a hypothetical static intervention on a binary time-varying treatment as described by Picciotto et al. Structural Nested Cumulative Failure Time Models to Estimate the Effect of Hypothetical Interventions. JASA 2013
  • SAS –Sample program to simulate data from a Structural Nested Accelerated Failure Time Model as described by Young et al.

Partial Identification Using Instrumental Variables

  • SAS – IV_BOUNDS macro provides bounds for the average treatment effect of a binary treatment as described by Swannson et al. Partial identification of the average treatment effect using instrumental variables. JASA 2018; 113(522):933-947.