From 06ce36d94009e99d21051978b71897139fc06610 Mon Sep 17 00:00:00 2001 From: Nima Hejazi Date: Sat, 21 Sep 2024 16:33:00 -0400 Subject: [PATCH] add lmtp pointer + loosen ipcw test --- README.Rmd | 35 ++++++++++------- README.md | 61 ++++++++++++++++++++--------- docs/index.html | 13 ++++-- docs/pkgdown.yml | 2 +- inst/REFERENCES.bib | 26 ++++++++++++ tests/testthat/test-estim_tmle_os.R | 4 +- 6 files changed, 102 insertions(+), 39 deletions(-) diff --git a/README.Rmd b/README.Rmd index dcce9fe..e9b79b3 100644 --- a/README.Rmd +++ b/README.Rmd @@ -231,25 +231,30 @@ After using the `txshift` R package, please cite the following: ## Related -* [R/`tmle3shift`](https://github.com/tlverse/tmle3shift) - An R package - providing an independent implementation of the same core routines for the TML - estimation procedure and statistical methodology as is made available here, - through reliance on a unified interface for Targeted Learning provided by the +* [R/`tmle3shift`](https://github.com/tlverse/tmle3shift) - An R package that + is an independent implementation of the same core methodology for TML + estimation as provided here but written based on the [`tmle3`](https://github.com/tlverse/tmle3) engine of the [`tlverse` - ecosystem](https://github.com/tlverse). + ecosystem](https://github.com/tlverse). Unlike `txshift`, this package does + not provide tools for estimation under two-phase sampling designs. -* [R/`medshift`](https://github.com/nhejazi/medshift) - An R package providing - facilities to estimate the causal effect of stochastic treatment regimes in - the mediation setting, including classical (IPW) and augmented double robust - (one-step) estimators. This is an implementation of the methodology explored - by @diaz2020causal. +* [R/`medshift`](https://github.com/nhejazi/medshift) - An experimental R + package for estimating causal mediation effects with stochastic interventions, + including via inverse probability weighted and asymptotically efficient + one-step estimators, as first described in @diaz2020causal. -* [R/`haldensify`](https://github.com/nhejazi/haldensify) - A minimal package - for estimating the conditional density treatment mechanism component of this - parameter based on using the [highly adaptive +* [R/`haldensify`](https://github.com/nhejazi/haldensify) - An R package for + estimating the generalized propensity score (conditional density) nuisance + parameter using the [highly adaptive lasso](https://github.com/tlverse/hal9001) [@coyle-hal9001-rpkg; - @hejazi2020hal9001-joss] in combination with a pooled hazard regression. This - package implements a variant of the approach advocated by @diaz2011super. + @hejazi2020hal9001-joss] via an application of pooled hazard regression + [@diaz2011super]. + +* [R/`lmtp`](https://github.com/nt-williams/lmtp) - An R package for estimating + the causal effects of *longitudinal* modified treatment policies, which are a + generalization of the type of effect considered in this package. The LMTP + framework was first introduced in @diaz2021nonparametric and the `lmtp` + package is described in @williams2023lmtp. --- diff --git a/README.md b/README.md index 307ec18..1179a24 100644 --- a/README.md +++ b/README.md @@ -268,25 +268,32 @@ After using the `txshift` R package, please cite the following: ## Related - [R/`tmle3shift`](https://github.com/tlverse/tmle3shift) - An R package - providing an independent implementation of the same core routines for - the TML estimation procedure and statistical methodology as is made - available here, through reliance on a unified interface for Targeted - Learning provided by the [`tmle3`](https://github.com/tlverse/tmle3) - engine of the [`tlverse` ecosystem](https://github.com/tlverse). - -- [R/`medshift`](https://github.com/nhejazi/medshift) - An R package - providing facilities to estimate the causal effect of stochastic - treatment regimes in the mediation setting, including classical (IPW) - and augmented double robust (one-step) estimators. This is an - implementation of the methodology explored by Dı́az and Hejazi (2020). - -- [R/`haldensify`](https://github.com/nhejazi/haldensify) - A minimal - package for estimating the conditional density treatment mechanism - component of this parameter based on using the [highly adaptive + that is an independent implementation of the same core methodology for + TML estimation as provided here but written based on the + [`tmle3`](https://github.com/tlverse/tmle3) engine of the [`tlverse` + ecosystem](https://github.com/tlverse). Unlike `txshift`, this package + does not provide tools for estimation under two-phase sampling + designs. + +- [R/`medshift`](https://github.com/nhejazi/medshift) - An experimental + R package for estimating causal mediation effects with stochastic + interventions, including via inverse probability weighted and + asymptotically efficient one-step estimators, as first described in + Dı́az and Hejazi (2020). + +- [R/`haldensify`](https://github.com/nhejazi/haldensify) - An R package + for estimating the generalized propensity score (conditional density) + nuisance parameter using the [highly adaptive lasso](https://github.com/tlverse/hal9001) (Coyle, Hejazi, Phillips, - et al. 2022; Hejazi, Coyle, and van der Laan 2020) in combination with - a pooled hazard regression. This package implements a variant of the - approach advocated by Dı́az and van der Laan (2011). + et al. 2022; Hejazi, Coyle, and van der Laan 2020) via an application + of pooled hazard regression (Dı́az and van der Laan 2011). + +- [R/`lmtp`](https://github.com/nt-williams/lmtp) - An R package for + estimating the causal effects of *longitudinal* modified treatment + policies, which are a generalization of the type of effect considered + in this package. The LMTP framework was first introduced in Dı́az et + al. (2021) and the `lmtp` package is described in Williams and Dı́az + (2023). ------------------------------------------------------------------------ @@ -388,6 +395,16 @@ Springer Science & Business Media. +
+ +Dı́az, Iván, Nicholas Williams, Katherine L Hoffman, and Edward J +Schenck. 2021. “Nonparametric Causal Effects Based on Longitudinal +Modified Treatment Policies.” *Journal of the American Statistical +Association* 118 (542): 846–57. +. + +
+
Haneuse, Sebastian, and Andrea Rotnitzky. 2013. “Estimation of the @@ -431,4 +448,12 @@ Biostatistics* 7 (1): 1–21.
+
+ +Williams, Nicholas, and Iván Dı́az. 2023. “Lmtp: An R Package for +Estimating the Causal Effects of Modified Treatment Policies.” +*Observational Studies* 9 (2): 103–22. + +
+ diff --git a/docs/index.html b/docs/index.html index 7599b56..fe08ceb 100644 --- a/docs/index.html +++ b/docs/index.html @@ -266,9 +266,10 @@

CitationRelated


@@ -328,6 +329,9 @@

References ———. 2018. “Stochastic Treatment Regimes.” In Targeted Learning in Data Science: Causal Inference for Complex Longitudinal Studies, 167–80. Springer Science & Business Media. +
+Dı́az, Iván, Nicholas Williams, Katherine L Hoffman, and Edward J Schenck. 2021. “Nonparametric Causal Effects Based on Longitudinal Modified Treatment Policies.” Journal of the American Statistical Association 118 (542): 846–57. https://doi.org/10.1080/01621459.2021.1955691. +
Haneuse, Sebastian, and Andrea Rotnitzky. 2013. “Estimation of the Effect of Interventions That Modify the Received Treatment.” Statistics in Medicine 32 (30): 5260–77.
@@ -343,6 +347,9 @@

References Rose, Sherri, and Mark J van der Laan. 2011. “A Targeted Maximum Likelihood Estimator for Two-Stage Designs.” International Journal of Biostatistics 7 (1): 1–21. +
+Williams, Nicholas, and Iván Dı́az. 2023. “Lmtp: An R Package for Estimating the Causal Effects of Modified Treatment Policies.” Observational Studies 9 (2): 103–22. +
diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 207fbbb..aca3476 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -3,7 +3,7 @@ pkgdown: 2.1.1 pkgdown_sha: ~ articles: intro_txshift: intro_txshift.html -last_built: 2024-09-21T20:13Z +last_built: 2024-09-21T20:31Z urls: reference: https://code.nimahejazi.org/txshift/reference article: https://code.nimahejazi.org/txshift/articles diff --git a/inst/REFERENCES.bib b/inst/REFERENCES.bib index db09243..0529e66 100644 --- a/inst/REFERENCES.bib +++ b/inst/REFERENCES.bib @@ -245,3 +245,29 @@ @article{haneuse2013estimation year={2013}, publisher={Wiley Online Library} } + +@article{diaz2021nonparametric, + title={Nonparametric causal effects based on longitudinal modified treatment + policies}, + author={D{\'\i}az, Iv{\'a}n and Williams, Nicholas and Hoffman, Katherine L + and Schenck, Edward J}, + journal={Journal of the American Statistical Association}, + volume={118}, + number={542}, + pages={846--857}, + year={2021}, + publisher={Taylor \& Francis}, + doi={10.1080/01621459.2021.1955691} +} + +@article{williams2023lmtp, + title={lmtp: An {R} package for estimating the causal effects of modified + treatment policies}, + author={Williams, Nicholas and D{\'\i}az, Iv{\'a}n}, + journal={Observational Studies}, + volume={9}, + number={2}, + pages={103--122}, + year={2023}, + publisher={University of Pennsylvania Press} +} diff --git a/tests/testthat/test-estim_tmle_os.R b/tests/testthat/test-estim_tmle_os.R index 7d2e804..d9d0cb5 100644 --- a/tests/testthat/test-estim_tmle_os.R +++ b/tests/testthat/test-estim_tmle_os.R @@ -162,7 +162,7 @@ if (require("sl3")) { ipcw_os_psi <- as.numeric(ipcw_os$psi) # test for reasonable equality between estimators - test_that("IPCW-augmented TMLE and one-step match reasonably closely", { - expect_equal(ipcw_tmle_psi, ipcw_os_psi, tol = 1e-3) + test_that("IPCW-augmented TMLE and one-step match reasonably well", { + expect_equal(ipcw_tmle_psi, ipcw_os_psi, tol = 1e-2) }) }