GetScores: Compute doubly robust scores for a fitted ensemble tree or...

View source: R/BestLinearProj.R

GetScoresR Documentation

Compute doubly robust scores for a fitted ensemble tree or forest.

Description

Compute doubly robust scores for a fitted ensemble tree or forest. Only valid to use when estimating conditional average treatment effects.

Usage

GetScores(
  myfit,
  coord_df,
  covars,
  subset = NULL,
  debiasing.weights = NULL,
  num.trees.for.weights = 500
)

Arguments

myfit

A fitted ensemble tree or forest.

coord_df

Data of coordinating site ('data.table').

covars

A vector of covariate names used.

subset

Specifies subset of the training examples over which we estimate the ATE. WARNING: For valid statistical performance, the subset should be defined only using features Xi, not using the treatment Wi or the outcome Yi.

debiasing.weights

A vector of length n (or the subset length) of debiasing weights. If NULL (default) these are obtained via the appropriate doubly robust score construction, e.g., in the case of causal_forests with a binary treatment, they are obtained via inverse-propensity weighting.

num.trees.for.weights

In some cases (e.g., with causal forests with a continuous treatment), we need to train auxiliary forests to learn debiasing weights. This is the number of trees used for this task. Note: this argument is only used when 'debiasing.weights' = NULL.

Note

The function is modified based on the R package 'grf' https://github.com/grf-labs/grf/blob/master/r-package/grf/R/get_scores.R.


ellenxtan/ifedtree documentation built on March 28, 2023, 9:09 a.m.