-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
I tried to run the example code for this package and came across an error when I tried to run the weighted CATE estimator.
n = 4000; threshold = 0
X = sample(seq(-4, 4, by = 8/41.5), n, replace = TRUE)
W = as.numeric(X >= threshold)
Y = 0.4 * W + 1 / (1 + exp(2 * X)) + 0.2 * rnorm(n)
thresh.low = -1; thresh.high = 1
W = as.numeric(thresh.low <= X & X <= thresh.high)
Y = 0.2 * (1 + X) * W + 1 / (1 + exp(2 * X)) + rnorm(n)
out.4 = optrdd(X=X, Y=Y, W=W, max.second.derivative = 0.5)
print(out.4); plot(out.4, xlim = c(-2.5, 2.5))
This produced the following error:
Error in cbind.Matrix(x, y, deparse.level = 0L) :
cannot get a slot ("p") from an object of type "double"
This code seems to only work with older versions of the Matrix package, but not for newer versions.
Metadata
Metadata
Assignees
Labels
No labels