File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff 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 ,
You can’t perform that action at this time.
0 commit comments