xnie / rlearner

Quasi-Oracle Estimation of Heterogeneous Treatment Effects

Home Page:https://arxiv.org/abs/1712.04912

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error in p_cf$prediction : $ operator is invalid for atomic vectors

dbroockman opened this issue · comments

I installed the package and its dependencies and ran the following example based on the readme https://github.com/xnie/rlearner#example-usage:

library(rlearner)
library(zeallot)

n = 100

data = toy_data_simulation(n)

model_specs = list(
  glmnet = list(
    tune_grid = expand.grid(
      alpha=c(0,0.5,1),
      lambda=exp(seq(-5,2,0.2))),
    extra_args = list())
)

r_fit = rlearner_cv(data$x, data$w, data$y, tau_model_specs=model_specs)

I get this error:

Error in p_cf$prediction : $ operator is invalid for atomic vectors

(I am getting the same error when using my own data.)

Thanks. I added those and I still get the error.

Thanks for bringing this to our attention! Due to version issues and package limitations, we are no longer supporting caret-based estimators, and are planning on updating the repository to reflect this change. However, this does not affect replicating the results from the paper as the paper does not use caret-based code.