Efficient Estimation of the Causal Effects of Stochastic Interventions
Overview
Efficient estimation of the population-level causal effects of stochastic interventions on a continuous-valued exposure. Both one-step and targeted minimum loss estimators are implemented for the counterfactual mean value of an outcome of interest under an additive modified treatment policy, a stochastic intervention that may depend on the natural value of the exposure. To accommodate settings with outcome-dependent two-phase sampling, procedures incorporating inverse probability of censoring weighting are provided to facilitate the construction of inefficient and efficient one-step and targeted minimum loss estimators. The causal parameter and its estimation were first described by Díaz and van der Laan (2013) doi:10.1111/j.1541-0420.2011.01685.x, while the multiply robust estimation procedure and its application to data from two-phase sampling designs is detailed in NS Hejazi, MJ van der Laan, HE Janes, PB Gilbert, and DC Benkeser (2020) doi:10.1111/biom.13375. The software package implementation is described in NS Hejazi and DC Benkeser (2020) doi:10.21105/joss.02447. Estimation of nuisance parameters may be enhanced through the Super Learner ensemble model in 'sl3', available for download from GitHub using 'remotes::install_github("tlverse/sl3")'.
Install
Health
NOTERd filesr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64, r-oldrel-macos-arm64, r-oldrel-macos-x86_64, r-oldrel-windows-x86_64, r-patched-linux-x86_64, r-release-linux-x86_64, r-release-macos-arm64, r-release-macos-x86_64, r-release-windows-x86_64
checkRd: (-1) est_g_exp.Rd:55: Lost braces; missing escapes or markup?
55 | {A - delta}, {A + delta}, and {A + 2 * delta}).
| ^
checkRd: (-1) est_g_exp.Rd:55: Lost braces; missing escapes or markup?
55 | {A - delta}, {A + delta}, and {A + 2 * delta}).
| ^
checkRd: (-1) est_g_exp.Rd:55: Lost braces; missing escapes or markup?
55 | {A - delta}, {A + delta}, and {A + 2 * delta}).
| ^- NOTE13 NOTENow
- NOTE14 NOTE2026-03-10
Documentation
- Help pages
- 21
- Examples that run
- 100%6 run in a plain check
- Exported functions with examples
- 100%
- Documented parameters
- 68%
- Return-value docs
- 100%
- Help pages citing references
- 0% with a bibliography file
Downloads
Repository
- PRs merged (all time)
- 95%
- Median days to close, 50 most recently updated closed issues
- 10
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
11 development-tooling and community-health practices detected across 7 families in the upstream repository
Checks run against github.com/nhejazi/txshift on 2026-10-11.
The R CMD check workflow runs on Linux, macOS and Windows
Show all practicesHide 3 practices
Dependencies
Installing txshift adds 51 packages (23 with compiled code, 45 MB of source tarballs). Heaviest: stringi 11 MB, ggplot2 6.0 MB, data.table 5.7 MB.
CRAN will archive these unless their check problems are fixed by the date shown. This package needs each one to install.
- hal9001fix by Oct 29
Code & Tests
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- RR 4.2.0 released · 2022-04-22
- 0.3.8Latest
- unarchivedReturned to CRAN2022-01-28
- 0.3.72022-01-28 · diff ↗
- archivedRemoved from CRAN2021-11-03requires archived packages 'hal9001' and 'haldensify',
- 0.3.62021-10-18 · diff ↗
- RR 4.1.0 released · 2021-05-18
- 0.3.52021-02-07 · diff ↗
- 0.3.42020-09-25
- RR 4.0.0 released · 2020-04-24
Package metadata
- First published
- 2020-09-25
- Total releases
- 5 / 6 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 3.2.0
- Download size
- 70 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("txshift")The package provides a citation file that builds its entry when R runs it. Run citation() to see it.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-17, which the citation names so these numbers can be found later. More on citing and the projects behind them.