Skip to content

Commit

Permalink
add lmtp pointer + loosen ipcw test
Browse files Browse the repository at this point in the history
  • Loading branch information
nhejazi committed Sep 21, 2024
1 parent f1a255b commit 06ce36d
Show file tree
Hide file tree
Showing 6 changed files with 102 additions and 39 deletions.
35 changes: 20 additions & 15 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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.

---

Expand Down
61 changes: 43 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

------------------------------------------------------------------------

Expand Down Expand Up @@ -388,6 +395,16 @@ Springer Science & Business Media.

</div>

<div id="ref-diaz2021nonparametric" class="csl-entry">

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>.

</div>

<div id="ref-haneuse2013estimation" class="csl-entry">

Haneuse, Sebastian, and Andrea Rotnitzky. 2013. “Estimation of the
Expand Down Expand Up @@ -431,4 +448,12 @@ Biostatistics* 7 (1): 1–21.

</div>

<div id="ref-williams2023lmtp" class="csl-entry">

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.

</div>

</div>
13 changes: 10 additions & 3 deletions docs/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
26 changes: 26 additions & 0 deletions inst/REFERENCES.bib
Original file line number Diff line number Diff line change
Expand Up @@ -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}
}
4 changes: 2 additions & 2 deletions tests/testthat/test-estim_tmle_os.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
}

0 comments on commit 06ce36d

Please sign in to comment.