tlverse / tmle3

@@ -81,7 +81,7 @@
Loading
81 81
#' lrnr_glm_sp_gaussian <- lrnr_glm_sp_gaussian$train(task_continuous)
82 82
#' preds <- lrnr_glm_sp_gaussian$predict(task_continuous)
83 83
#' beta <- lrnr_glm_sp_gaussian$fit_object$coefficients
84 -
#' ## In this case, since `append_interaction_matrix = TRUE`, it is equivalent to:
84 +
#' ## In this case, since `append_interaction_matrix = FALSE`, it is equivalent to:
85 85
#' ## Subset to baseline treatment arm
86 86
#' subset_to <- task_continuous$data[["A"]] == 0
87 87
#'

@@ -27,6 +27,8 @@
Loading
27 27
      include_variance_node <- self$options$estimand == "CATE"
28 28
      if (self$options$estimand == "RR") {
29 29
        variable_types <- list(Y = variable_type("continuous"))
30 +
      } else if (self$options$estimand == "OR") {
31 +
        variable_types <- list(Y = variable_type("binomial"))
30 32
      }
31 33
      tmle_task <- point_tx_task(data, node_list, variable_types, scale_outcome = FALSE, include_variance_node = include_variance_node)
32 34

@@ -25,7 +25,11 @@
Loading
25 25
    make_tmle_task = function(data, node_list, ...) {
26 26
      variable_types <- self$options$variable_types
27 27
      include_variance_node <- FALSE
28 -
28 +
      if (self$options$estimand == "RR") {
29 +
        variable_types <- list(Y = variable_type("continuous"))
30 +
      } else if (self$options$estimand == "OR") {
31 +
        variable_types <- list(Y = variable_type("binomial"))
32 +
      }
29 33
      tmle_task <- point_tx_task(data, node_list, variable_types, scale_outcome = FALSE, include_variance_node = include_variance_node)
30 34
31 35
      return(tmle_task)
Files Coverage
R 80.29%
Project Totals (59 files) 80.29%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading