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

DR scores outside of 0-1 for binary outcomes #138

Open
jkortner opened this issue Aug 24, 2022 · 1 comment
Open

DR scores outside of 0-1 for binary outcomes #138

jkortner opened this issue Aug 24, 2022 · 1 comment
Labels
question Further information is requested

Comments

@jkortner
Copy link

jkortner commented Aug 24, 2022

Thank you for the package! I'm trying to estimate double robust scores for a binary outcome variable. However, when using double_robust_scores(), I get gamma values outside of 0-1. I can reproduce this with the example in the package but a binary outcome variable.

# library(policytree)
n <- 250
p <- 10
X <- matrix(rnorm(n * p), n, p)
W <- as.factor(sample(c("A", "B", "C"), n, replace = TRUE))
Y <- sample(c(0, 1), n, replace = TRUE) # new outcome variable 
multi.forest <- grf::multi_arm_causal_forest(X, Y, W)

# Compute doubly robust reward estimates.
Gamma.matrix <- double_robust_scores(multi.forest)
summary(Gamma.matrix)

   A                 B                 C          
 Min.   :-1.2928   Min.   :-1.8635   Min.   :-1.3356  
 1st Qu.: 0.4616   1st Qu.: 0.5229   1st Qu.: 0.3900  
 Median : 0.4968   Median : 0.5512   Median : 0.4283  
 Mean   : 0.4956   Mean   : 0.5451   Mean   : 0.4237  
 3rd Qu.: 0.5376   3rd Qu.: 0.5911   3rd Qu.: 0.4581  
 Max.   : 2.4399   Max.   : 2.4520   Max.   : 2.6737  
@swager
Copy link
Member

swager commented Aug 27, 2022

That's right; the DR scores used with AIPW are not bounded within the range of the Y. This is simply a consequence of how DR scores are obtained; and doing something direct like thresholding DR scores into the range of the data might actually bias the algorithm.

There are other alternatives to AIPW that avoid this unboundedness issue; see, e.g., the following. However, that's not what's implemented/used here.

Tan, Zhiqiang. "Bounded, efficient and doubly robust estimation with inverse weighting." Biometrika 97.3 (2010): 661-682.

@erikcs erikcs added the question Further information is requested label Aug 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants