grf-labs / grf

Generalized Random Forests
https://grf-labs.github.io/grf/
GNU General Public License v3.0
938 stars 250 forks source link

Weak instrument (get_scores.instrumental_forest) #1343

Closed howardzzhang closed 10 months ago

howardzzhang commented 10 months ago

In get_scores.instrumental_forest, there is a test for weak instruments

if (abs(min(compliance.score)) <= 0.01 * sd(W.orig)) {
      warning(paste0(
        "The instrument appears to be weak, with some compliance scores as ",
        "low as ", round(min(compliance.score), 4)
      ))
    }

Should the condition be min(abs(compliance.score)) instead? Since debiasing.weights <- (Z.orig - Z.hat) / (Z.hat * (1 - Z.hat)) / compliance.score, it seems like there will be a large infusion of noise when the compliance score is close to zero (in absolute value).

erikcs commented 10 months ago

Thanks @howardzzhang, yes you are right, that is a bug, do you want to send a pull request?