Skip to content

Commit 7769f0a

Browse files
committed
fix bug in if condition
1 parent a10e38d commit 7769f0a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

R/double_ml_irm.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ DoubleMLIRM = R6Class("DoubleMLIRM",
242242
fold_specific_params = private$fold_specific_params)
243243

244244
g1_hat = NULL
245-
if ((is.character(self$score) && self$score == "ATE") | is.function(self$score)) {
245+
if ((is.character(self$score) && self$score == "ATE") || is.function(self$score)) {
246246
g1_hat = dml_cv_predict(self$learner$ml_g,
247247
c(self$data$x_cols, self$data$other_treat_cols),
248248
self$data$y_col,
@@ -341,7 +341,7 @@ DoubleMLIRM = R6Class("DoubleMLIRM",
341341
tune_settings$measure$ml_g,
342342
private$learner_class$ml_g)
343343

344-
if (self$score == "ATE" | is.function(self$score)) {
344+
if ((is.character(self$score) && self$score == "ATE") || is.function(self$score)) {
345345
tuning_result_g1 = dml_tune(self$learner$ml_g,
346346
c(self$data$x_cols, self$data$other_treat_cols),
347347
self$data$y_col,

0 commit comments

Comments
 (0)