Skip to content

Commit 64584b5

Browse files
committed
fix another post-merge issue
1 parent 33087e1 commit 64584b5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

R/double_ml_pliv.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -523,8 +523,8 @@ DoubleMLPLIV = R6Class("DoubleMLPLIV",
523523
g_hat = list(preds = NULL, models = NULL)
524524
if (exists("ml_g", where = private$learner_)) {
525525
# get an initial estimate for theta using the partialling out score
526-
psi_a = -(d - r_hat) * (z - m_hat)
527-
psi_b = (z - m_hat) * (y - l_hat)
526+
psi_a = -(d - r_hat$preds) * (z - m_hat$preds)
527+
psi_b = (z - m_hat$preds) * (y - l_hat$preds)
528528
theta_initial = -mean(psi_b, na.rm = TRUE) / mean(psi_a, na.rm = TRUE)
529529

530530
data_aux = data.table(self$data$data_model,
@@ -831,8 +831,8 @@ DoubleMLPLIV = R6Class("DoubleMLPLIV",
831831
y = self$data$data_model[[self$data$y_col]]
832832
z = self$data$data_model[[self$data$z_cols]]
833833

834-
psi_a = -(d - r_hat) * (z - m_hat)
835-
psi_b = (z - m_hat) * (y - l_hat)
834+
psi_a = -(d - r_hat$preds) * (z - m_hat$preds)
835+
psi_b = (z - m_hat$preds) * (y - l_hat$preds)
836836
theta_initial = -mean(psi_b, na.rm = TRUE) / mean(psi_a, na.rm = TRUE)
837837

838838
data_aux = data.table(self$data$data_model,

0 commit comments

Comments
 (0)