Weighted-quantile difference: treated quantiles weighted by 1/e,
control quantiles by 1/(1 - e). Mirrors morie.fn.causqte.
References
Firpo S (2007). Efficient semiparametric estimation of quantile treatment effects. Econometrica 75(1), 259-276.
Examples
set.seed(1)
n <- 3000
x <- stats::rnorm(n)
e <- pmin(pmax(1/(1 + exp(-x)), 0.05), 0.95)
tr <- as.numeric(stats::runif(n) < e)
y <- x + stats::rnorm(n) + 3 * tr
morie_qte_firpo(y, tr, e, tau = c(0.25, 0.5, 0.75))
#> $qte
#> [1] 2.860870 2.927028 2.885366
#>
#> $q1
#> [1] 1.948838 2.974706 3.920427
#>
#> $q0
#> [1] -0.91203202 0.04767761 1.03506042
#>
#> $tau
#> [1] 0.25 0.50 0.75
#>
#> $n
#> [1] 3000
#>
