Package: txshift 0.3.9

txshift: Efficient Estimation of the Causal Effects of Stochastic Interventions

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")'.

Authors:Nima Hejazi [aut, cre, cph], David Benkeser [aut], Iván Díaz [ctb], Jeremy Coyle [ctb], Mark van der Laan [ctb, ths]

txshift_0.3.9.tar.gz
txshift_0.3.9.zip(r-4.7)txshift_0.3.9.zip(r-4.6)txshift_0.3.9.zip(r-4.5)
txshift_0.3.9.tgz(r-4.6-any)txshift_0.3.9.tgz(r-4.5-any)
txshift_0.3.9.tar.gz(r-4.7-any)txshift_0.3.9.tar.gz(r-4.6-any)
txshift_0.3.9.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
txshift/json (API)
NEWS

# Install 'txshift' in R:
install.packages('txshift', repos = c('https://nhejazi.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/nhejazi/txshift/issues

On CRAN:

Conda:

causal-effectscausal-inferencecensored-datamachine-learningrobust-statisticsstatisticsstochastic-interventionsstochastic-treatment-regimestargeted-learningtreatment-effectsvariable-importance

5.32 score 14 stars 30 scripts 217 downloads 2 exports 55 dependencies

Last updated from:06ce36d940. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK168
source / vignettesOK204
linux-release-x86_64OK191
macos-release-arm64OK146
macos-oldrel-arm64OK130
windows-develOK145
windows-releaseOK171
windows-oldrelOK138
wasm-releaseOK124

Exports:msm_vimshifttxshift

Dependencies:abindassertthatclicodetoolscpp11data.tabledigestdplyrfarverforeachfuturefuture.applygenericsggplot2glmnetglobalsgluegtablehal9001haldensifyisobanditeratorslabelinglatex2explatticelifecyclelistenvlsplinemagrittrMatrixmatrixStatsmvtnormorigamiparallellypillarpkgconfigR6rbibutilsRColorBrewerRcppRcppEigenRdpackrlangS7scalesshapestringistringrsurvivaltibbletidyselectutf8vctrsviridisLitewithr

Evaluating Causal Effects of Modified Treatment Policies

Rendered fromintro_txshift.Rmdusingknitr::rmarkdownon May 22 2026.

Last update: 2023-05-15
Started: 2018-01-23

Readme and manuals

Help Manual

Help pageTopics
Bound Precisionbound_precision
Bound Generalized Propensity Scorebound_propensity
Confidence Intervals for Counterfactual Mean Under Stochastic Interventionconfint.txshift
Compute the Shift Parameter Estimate and the Efficient Influence Functioneif
Estimate the Censoring Mechanismest_g_cens
Estimate the Exposure Mechanism via Generalized Propensity Scoreest_g_exp
Estimate Auxiliary Covariate of Full Data Efficient Influence Functionest_Hn
Estimate the Outcome Mechanismest_Q
Estimate Probability of Censoring by Two-Phase Samplingest_samp
Fit One-Dimensional Fluctuation Model for Updating Initial Estimatesfit_fluctuation
Iterative IPCW Update Procedure of Augmented Efficient Influence Functionipcw_eif_update
Working marginal structural model for causal effects of an intervention gridmsm_vimshift
One-Step Estimate of Counterfactual Mean of Stochastic Shift Interventiononestep_txshift
Plot working MSM for causal effects of an intervention gridplot.txshift_msm
Print Method for Counterfactual Mean of Stochastic Shift Interventionprint.txshift
Print Method for Marginal Structural Modelsprint.txshift_msm
Transform values from the unit interval back to their original scalescale_to_original
Transform values by scaling to the unit intervalscale_to_unit
Simple Additive Modified Treatment Policyshift_additive
Targeted Minimum Loss Estimate of Counterfactual Mean of Stochastic Shift Interventiontmle_txshift
Efficient Estimate of Counterfactual Mean of Stochastic Shift Interventiontxshift