Skip to content

Can policy_tree handle missing values in covariate space (X)? #139

@njawadekar

Description

@njawadekar

I am using policytree, version 1.2.0, and I am specifically trying to implement policy learning on the doubly robust reward estimates derived from an honest causal forest (GRF package). While I believe that the GRF package can handle missing covariates (X), see info at link here, it appears that policy_tree cannot handle missing values, is that correct?

When I try running the following code, I get the error, "Covariate matrix X contains missing values". However, I did not get any error when running the causal forest on the same dataset. Please assist - thanks!

Compute doubly robust reward estimates from causal forest

Gamma.matrix <- double_robust_scores(causalf)
head(Gamma.matrix)

Fit a depth 2 tree on a random training subset of my sample

N = as.numeric(length(Y))
train <- sample(1:N, 3000)
opt.tree <- policy_tree(X[train, ], Gamma.matrix[train, ], depth = 2) This is where the error arose
opt.tree

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions