🎯 🎲 Targeted Learning and Variable Importance for the Causal Effect of a Stochastic Shift Intervention
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.



Travis-CI Build Status AppVeyor Build Status Coverage Status Project Status: Active – The project has reached a stable, usable state and is being actively developed. License: GPL v3

Targeted Learning and Variable Importance with Stochastic Interventions

Authors: Nima Hejazi, Jeremy Coyle, and Mark van der Laan

What’s tmle3shift?

tmle3shift is an adapter/extension R package in the tlverse ecosystem that exposes support for the estimation of a target parameter defined as the mean counterfactual outcome under a posited shift of the natural value of a continuous-valued intervention, using the formalism of stochastic treatment regimes. As an adapter package, tmle3shift builds upon the core tlverse grammar introduced by tmle3, a general framework that supports the implementation of a range of TMLE parameters through a unified interface. For a detailed description of the target parameter, TML estimator, and algorithm implemented in tmle3shift, the interested reader is invited to consult Díaz and van der Laan (2012) and Díaz and van der Laan (2018). For a general discussion of the framework of targeted minimum loss-based estimation and the role this methodology plays in statistical and causal inference, the canonical references are van der Laan and Rose (2011) and van der Laan and Rose (2018).

Building on the original work surrounding the TML estimator for the aforementioned target parameter, tmle3shift additionally implements a set of techniques for variable importance analysis, allowing for a sequence of mean counterfactual outcomes, estimated under a sequence of posited shifts, to be summarized via a working marginal structural model (MSM). The goal of this work is to build upon the tlverse framework and the estimation methodology implemented for a single mean counterfactual outcome in order to introduce an end-to-end methodology for variable importance analyses.


You can install the development version of tmle3shift from GitHub via devtools with



If you encounter any bugs or have any specific feature requests, please file an issue.


  • R/txshift - An R package providing an independent implementation of the TML estimation procedure and statistical methodology as is made available here, without reliance on the tlverse grammar provided by tmle3.


The development of this software was supported in part through a grant from the National Institutes of Health: T32 LM012417-02.


The contents of this repository are distributed under the GPL-3 license. See file LICENSE for details.


Díaz, Iván, and Mark J van der Laan. 2012. “Population Intervention Causal Effects Based on Stochastic Interventions.” Biometrics 68 (2). Wiley Online Library: 541–49.

———. 2018. “Stochastic Treatment Regimes.” In Targeted Learning in Data Science: Causal Inference for Complex Longitudinal Studies, 167–80. Springer Science & Business Media.

van der Laan, Mark J, and Sherri Rose. 2011. Targeted Learning: Causal Inference for Observational and Experimental Data. Springer Science & Business Media.

———. 2018. Targeted Learning in Data Science: Causal Inference for Complex Longitudinal Studies. Springer Science & Business Media.