Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Warning message in average_late inaccurate #557

Closed
ginward opened this issue Oct 31, 2019 · 1 comment
Closed

Bug: Warning message in average_late inaccurate #557

ginward opened this issue Oct 31, 2019 · 1 comment

Comments

@ginward
Copy link
Contributor

ginward commented Oct 31, 2019

Description of the bug
It seems that the warning message here in average_late function committed by #490 is inaccurate:

if (min(subset.Z.hat) <= 0.01 || max(subset.Z.hat) >= 0.99) {
    rng <- range(subset.W.hat)
    warning(paste0(
      "Estimated treatment propensities take values between ",
      round(rng[1], 3), " and ", round(rng[2], 3),
      " and in particular get very close to 0 or 1. ",
      "Poor overlap may hurt perfmance for average conditional local average ",
      "treatment effect estimation."
    ))
  }

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

Because when W is continuous, W hat (or compliance score) could be negative or greater than 1. Similarly, when Z is continuous, Z hat could also be negative or greater than 1. In these cases, I don't think it is wise to use the criteria to judge poor compliance or overlap based on the 0 and 1 interval.

Or rather, is it the case that average_late should not be applied to a continuous treatment?

@ginward ginward changed the title Warning message in average_late inaccurate Bug: Warning message in average_late inaccurate Nov 1, 2019
@ginward ginward closed this as completed Nov 1, 2019
@jtibshirani
Copy link
Member

Closed by #562.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants