From f12d0a11fc3f9da1535d32aa5f7c70b6830ae753 Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Fri, 4 Mar 2022 11:11:26 -0800 Subject: [PATCH 1/3] use requireNamespace for optional test require() throws a warning if not installed, this will be an error for options(warn = 2) --- tests/testthat/test-lf_known.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/testthat/test-lf_known.R b/tests/testthat/test-lf_known.R index 51e0fe2e..7b6a7fb3 100644 --- a/tests/testthat/test-lf_known.R +++ b/tests/testthat/test-lf_known.R @@ -64,8 +64,8 @@ learner_list <- list( ) # pass defined likelihood into existing spec -if (require("tmle3shift")) { - tmle_spec <- tmle_shift( +if (requireNamespace("tmle3shift", quietly = TRUE)) { + tmle_spec <- tmle3shift::tmle_shift( shift_val = 0.5, likelihood_override = likelihood_def ) From 96677b353133a682e5ddb6b02ab7a3972dfc59a5 Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Fri, 4 Mar 2022 11:12:05 -0800 Subject: [PATCH 2/3] add to Suggests --- DESCRIPTION | 1 + 1 file changed, 1 insertion(+) diff --git a/DESCRIPTION b/DESCRIPTION index 7732d215..b1ca9e90 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -42,6 +42,7 @@ Suggests: Rsolnp, nnls, tmle, + tmle3shift, future, future.apply, xgboost From a69eac8d485705b8fb7b4a2d2f29de724776230c Mon Sep 17 00:00:00 2001 From: Jeremy Coyle Date: Wed, 30 Aug 2023 14:51:44 -0700 Subject: [PATCH 3/3] fix continuous under LTFU --- R/tmle3_Task.R | 4 +- docs/reference/tmle_tsm_all.html | 168 ------------------------------- 2 files changed, 2 insertions(+), 170 deletions(-) delete mode 100644 docs/reference/tmle_tsm_all.html diff --git a/R/tmle3_Task.R b/R/tmle3_Task.R index cd690bb8..3e3b28e0 100644 --- a/R/tmle3_Task.R +++ b/R/tmle3_Task.R @@ -64,8 +64,8 @@ tmle3_Task <- R6Class( if ((current_node$scale) && (current_type$type == "continuous") && (is.null(current_type$bounds))) { - min_x <- min(variable_data) - max_x <- max(variable_data) + min_x <- min(variable_data, na.rm=TRUE) + max_x <- max(variable_data, na.rm = TRUE) range <- max_x - min_x lower <- min_x #- 0.1 * range upper <- max_x #+ 0.1 * range diff --git a/docs/reference/tmle_tsm_all.html b/docs/reference/tmle_tsm_all.html deleted file mode 100644 index 766a75e9..00000000 --- a/docs/reference/tmle_tsm_all.html +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - - -All Treatment Specific Means — tmle_TSM_all • tmle - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - -
- -
-
- - -
-

O=(W,A,Y) -W=Covariates -A=Treatment (binary or categorical) -Y=Outcome (binary or bounded continuous)

-
- -
tmle_TSM_all()
- - - -
- -
- - - -
- - - - - - - -