Skip to contents

Regress the demeaned outcome on the residualised treatment and its interaction with the centred CATE predictions. alpha near 1 says the forest's average effect is calibrated; beta is the heterogeneity coefficient, and beta = 0 means the predicted variation carries no signal. Pass out-of-bag predictions – in-bag ones inflate beta mechanically. Mirrors morie.fn.crfhte.

Usage

morie_hte_blp_test(y, d, cate_predictions, propensity = NULL)

Arguments

y

Outcome.

d

Binary 0/1 treatment.

cate_predictions

Out-of-bag CATE estimates.

propensity

Treatment probabilities; default mean(d).

Value

List with alpha, beta, se_beta, p_value, heterogeneous, n.

References

Chernozhukov V, Demirer M, Duflo E, Fernandez-Val I (2018). Generic machine learning inference on heterogenous treatment effects in randomized experiments. arXiv:1712.04802.

Examples

set.seed(2)
n <- 100
X <- matrix(rnorm(n * 2), n, 2)
d <- rbinom(n, 1, 0.5)
y <- 1 + X[, 1] + d * (0.5 + X[, 2]) + rnorm(n, 0, 0.3)
tau <- 0.5 + X[, 2] + rnorm(n, 0, 0.2)
morie_hte_blp_test(y, d, tau)
#> $alpha
#> [1] 0.3927187
#> 
#> $beta
#> [1] 1.339662
#> 
#> $se_beta
#> [1] 0.2500231
#> 
#> $p_value
#> [1] 2.833643e-07
#> 
#> $heterogeneous
#> [1] TRUE
#> 
#> $n
#> [1] 100
#>