Skip to content

Commit 34647f2

Browse files
committed
change order learner and treat col; align with params
1 parent 0657c0e commit 34647f2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

R/double_ml.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1440,9 +1440,9 @@ DoubleML = R6Class("DoubleML",
14401440
simplify = F)
14411441
},
14421442
initialize_models = function() {
1443-
private$models_ = sapply(self$data$d_cols,
1443+
private$models_ = sapply(self$params_names(),
14441444
function(x) {
1445-
sapply(self$params_names(),
1445+
sapply(self$data$d_cols,
14461446
function(x) {
14471447
lapply(
14481448
seq(self$n_rep),
@@ -1464,7 +1464,7 @@ DoubleML = R6Class("DoubleML",
14641464
store_models = function(models) {
14651465
for (learner in self$params_names()) {
14661466
if (!is.null(models[[learner]])) {
1467-
private$models_[[self$data$treat_col]][[learner]][[
1467+
private$models_[[learner]][[self$data$treat_col]][[
14681468
private$i_rep]] = models[[learner]]
14691469
}
14701470
}

0 commit comments

Comments
 (0)