These functions are wrappers around various heterogeneous treatment effect learners that can be easily used as teacher models in the causal distillation tree framework.
causal_forest(): wrapper around grf::causal_forest().
bcf(): wrapper around bcf::bcf().
rboost(): (defunct) wrapper around rlearner::rboost().
rlasso(): (defunct) wrapper around rlearner::rlasso().
rkern(): (defunct) wrapper around rlearner::rkern().
Warning: The rboost(), rlasso(), and rkern() functions
are defunct as of version 1.0.0. Use rlearner_teacher() (e.g.,
rlearner_teacher(rlearner::rboost)) instead to convert
rlearner functions into correct format for use as teacher model in
CDT.
causal_forest(X, Y, Z, W = NULL, ...)rboost(X, Y, Z, W = NULL, ...)
rlasso(X, Y, Z, W = NULL, ...)
rkern(X, Y, Z, W = NULL, ...)
bcf(
X,
Y,
Z,
W = NULL,
pihat = "default",
w = NULL,
nburn = 2000,
nsim = 1000,
n_threads = 1,
no_output = TRUE,
...
)
Outputs of the respective base model functions:
causal_forest(): see output of grf::causal_forest().
rboost() (defunct): see output of rlearner::rboost().
rlasso() (defunct): see output of rlearner::rlasso().
rkern() (defunct): see output of rlearner::rkern().
A tibble, data.frame, or matrix of covariates.
A vector of outcomes.
A vector of treatments.
A vector of weights corresponding to treatment propensities.
Additional arguments to pass to the base model functions.
Length n estimates of propensity score
An optional vector of weights. When present, BCF fits a model \(y | x ~ N(f(x), \sigma^2 / w)\), where \(f(x)\) is the unknown function.
Number of burn-in MCMC iterations
Number of MCMC iterations to save after burn-in. The chain will run for nsim*nthin iterations after burn-in
An optional integer of the number of threads to parallelize within chain bcf operations on
logical, whether to suppress writing trees and training log to text files, defaults to FALSE.