| unc_qte | R Documentation |
Estimates the Quantile Treatment Effect (QTE) or Quantile
Treatment Effect on the Treated (QTT) under unconfoundedness, also known
as selection on observables. The key identifying assumption is
(Y(0), Y(1)) \perp D \mid X, i.e., potential outcomes are
independent of treatment conditional on covariates X.
Three estimation methods are available via est_method:
"ipw"Propensity-score reweighting (Firpo 2007). The
propensity score p(X) = P(D=1|X) is estimated by logit or
probit and used to reweight the sample so that the covariate
distributions of the treated and untreated groups match. For the QTE,
both groups are reweighted toward the population distribution; for the
QTT, only the untreated group is reweighted toward the treated
covariate distribution.
"or"Outcome regression via quantile regression inversion.
rq is fit on a dense internal grid of
\tau values, yielding a conditional quantile function
Q_{Y|X,D=j}(\tau) for each arm j. The marginal
distribution is recovered by averaging conditional quantile functions
over the empirical covariate distribution (Melly 2006; Chernozhukov,
Fernandez-Val, and Melly 2013).
"aipw"Doubly-robust augmented IPW. Combines the propensity score model with the conditional quantile outcome model. The CDF estimator is consistent if either the propensity score or the outcome model is correctly specified (semiparametric efficiency when both are correct).
When xformla = ~1 (the default), all three methods reduce to
simple quantile differences between the treated and untreated groups, which
is consistent under unconditional unconfoundedness. Covariates are required
for covariate-adjusted estimation.
Standard errors and uniform confidence bands are computed via the
empirical bootstrap. Setting biters = 0 is planned for a future
version to skip inference and return point estimates only.
unc_qte(
yname,
dname,
data,
xformla = ~1,
weightsname = NULL,
probs = seq(0.05, 0.95, 0.05),
alp = 0.05,
biters = 100,
cband = TRUE,
boot_type = "empirical",
method = c("logit", "probit"),
est_method = c("ipw", "or", "aipw"),
target = c("qte", "qtt"),
cl = 1
)
yname |
character; name of the outcome variable in |
dname |
character; name of the binary treatment indicator in
|
data |
data.frame containing the analysis data. |
xformla |
one-sided formula for covariates used in the propensity
score and/or outcome model, e.g. |
weightsname |
character; name of a column in |
probs |
numeric vector of quantile levels at which to evaluate the
QTE or QTT. Default |
alp |
significance level for confidence intervals. Default 0.05. |
biters |
number of bootstrap iterations for standard errors and confidence bands. Default 100. |
cband |
logical; if |
boot_type |
bootstrap variant. Currently only |
method |
propensity score link function: |
est_method |
estimation method; one of:
|
target |
target parameter; one of:
|
cl |
number of cores for parallel bootstrap. Default 1 (sequential). |
An object of class QTE containing:
qtenumeric vector of estimated QTE (or QTT) at each
element of probs.
ateestimated ATE (or ATT when target = "qtt").
qte.sebootstrap standard errors for qte.
qte.lower, qte.upperconfidence interval bounds
for qte; uniform when cband = TRUE, pointwise otherwise.
ate.se, ate.lower, ate.upperSE and CI
for ate.
probsthe probs vector passed by the user.
pscore.regfitted propensity score glm object, or
NULL when est_method = "or" or xformla = ~1.
Use summary() to print a formatted table and plot() to
display the QTE curve with confidence bands.
Firpo, Sergio. “Efficient Semiparametric Estimation of Quantile Treatment Effects.” Econometrica 75(1), pp. 259–276, 2007.
Melly, Blaise. “Estimation of Counterfactual Distributions Using Quantile Regression.” Working paper, University of St. Gallen, 2006.
Chernozhukov, Victor, Ivan Fernandez-Val, and Blaise Melly. “Inference on Counterfactual Distributions.” Econometrica 81(6), pp. 2205–2268, 2013.
data(lalonde)
## IPW, no covariates (simple quantile differences)
q1 <- unc_qte(yname = "re78", dname = "treat", data = lalonde.psid,
biters = 20, probs = seq(0.05, 0.95, 0.05))
summary(q1)
plot(q1)
## OR with covariates, QTE
xf <- ~ age + I(age^2) + education + black + hispanic + married + nodegree
q2 <- unc_qte(yname = "re78", dname = "treat", data = lalonde.psid,
xformla = xf, est_method = "or",
biters = 20, probs = seq(0.05, 0.95, 0.05))
summary(q2)
## AIPW with covariates, QTT
q3 <- unc_qte(yname = "re78", dname = "treat", data = lalonde.psid,
xformla = xf, est_method = "aipw", target = "qtt",
biters = 20, probs = seq(0.05, 0.95, 0.05))
summary(q3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.