Function double_robust_scores fails depending on treatment values
Closed this issue · 0 comments
halflearned commented
Homepage example, switching W
values from A,B,C
to 0, 1000, 2000
.
library(policytree)
n <- 250
p <- 10
X <- matrix(rnorm(n * p), n, p)
W <- sample(c("0", "1000", "2000"), n, replace = TRUE)
Y <- X[, 1] + X[, 2] * (W == "0") + X[, 3] * (W == "1") + runif(n)
multi.forest <- multi_causal_forest(X = X, Y = Y, W = W)
Gamma.matrix <- double_robust_scores(multi.forest)
Interestingly:
- Using a factor
W
instead of character doesn't help. - Switching
W
values fromA,B,C
to0, 1, 2
is fine.