
Honest causal forest for heterogeneous treatment effects
Source:R/causal_forest_honest.R
morie_causal_forest.RdEach tree splits on one half of a subsample by maximising the squared difference in child treatment effects, then re-estimates its leaf values on the untouched half. That honesty split is what makes the leaf effects approximately unbiased. Out-of-bag predictions average only the trees that never saw the row and are the ones to feed any downstream heterogeneity test.
Usage
morie_causal_forest(
y,
d,
x,
n_trees = 200L,
min_leaf = 10L,
max_depth = 6L,
mtry = NULL,
subsample = 0.5,
imbalance_penalty = 0,
seed = 0L
)Arguments
- y
Outcome.
- d
Binary 0/1 treatment.
- x
Covariate matrix (or vector).
- n_trees
Number of trees.
- min_leaf
Minimum units of each arm per leaf.
- max_depth
Maximum tree depth.
- mtry
Features tried per split; default
ceiling(sqrt(p)).- subsample
Fraction of rows drawn per tree.
- imbalance_penalty
GRF's split-imbalance regularizer, subtracted as
penalty * (1/n_L + 1/n_R). Zero recovers the plain Athey-Imbens criterion. It carries the units of the criterion itself, so it is not scale-free.- seed
RNG seed.
Value
List with cate, cate_oob, ate, cate_sd, n_trees,
n, and forest (usable with morie_causal_forest_predict()).
Details
Mirrors morie.fn.crfath.causal_forest_wager_athey and the shared
morie.fn._cforest.CausalForest core.