rd.qte: QTE and its uniform confidence band.

View source: R/rd.qte.R

rd.qteR Documentation

QTE and its uniform confidence band.

Description

rd.qte is the main function of the QTE.RD package. It estimates QTE with/without covariates. If bias=1, it corrects the bias in QTE estimates and obtains the robust confidence band and if bias=0, no bias correction is implemented.

Usage

rd.qte(y, x, d, x0, z0=NULL, tau, bdw, bias)

Arguments

y

a numeric vector, the outcome variable.

x

a vector (or a matrix) of covariates. When no covariates are included, x is simply a vector of the running variable. When covariates are present, x should be a matrix where the first column contains the running variable and the remaining columns contain the covariates.

d

a numeric vector, the treatment status.

x0

the cutoff point.

z0

the value of the covariates at which to evaluate the effects. For example, if a female dummy z is included, z0 = 1 may indicate the female subgroup.

tau

a vector of quantiles of interest.

bdw

the bandwidth value(s). If 'bdw' is a scalar, it is interpreted as the bandwidth for the median. See the function rdq.bandwidth for how to select this bandwidth. The bandwidths for the rest of the quantiles are computed automatically using the formula of Yu and Jones (1998). If it is a vector with the same dimension as 'tau', the function will use these values for the respective quantiles accordingly.

bias

either 0 or 1. If bias=1, the QTE estimate is bias corrected and the robust confidence band in Qu, Yoon, and Perron (2024) is produced. If bias=0, no bias correction is implemented.

Value

A list with elements:

qte

QTE estimates.

uband

uniform confidence band for QTE. If bias=1, the band is robust capturing the effect of the bias correction. If bias=0, no bias correction is implemented.

sigma

standard errors for each quantile level. If bias=1, its value captures the effect of the bias correction. If bias=0, no bias correction is implemented.

qp.est

conditional quantile estimates on the right side of x_{0} (or for the D=1 group).

qm.est

conditional quantile estimates on the left side of x_{0} (or for the D=0 group).

References

Zhongjun Qu, Jungmo Yoon, Pierre Perron (2024), "Inference on Conditional Quantile Processes in Partially Linear Models with Applications to the Impact of Unemployment Benefits," The Review of Economics and Statistics; \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1162/rest_a_01168")}

Zhongjun Qu and Jungmo Yoon (2019), "Uniform Inference on Quantile Effects under Sharp Regression Discontinuity Designs," Journal of Business and Economic Statistics, 37(4), 625–647; \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1080/07350015.2017.1407323")}

Keming Yu and M. C. Jones (1998), “Local Linear Quantile Regression,” Journal of the American Statistical Association, 93(441), 228–237; \Sexpr[results=rd]{tools:::Rd_expr_doi("10.2307/2669619")}

Examples

# Without covariate
n <- 500
x <- runif(n,min=-4,max=4)
d <- (x > 0)
y <- x + 0.3*(x^2) - 0.1*(x^3) + 1.5*d + rnorm(n)
tlevel <- seq(0.1,0.9,by=0.1)
A <- rd.qte(y=y,x=x,d=d,x0=0,z0=NULL,tau=tlevel,bdw=2,bias=1)

# (continued) With covariates
z <- sample(c(0,1),n,replace=TRUE)
y <- x + 0.3*(x^2) - 0.1*(x^3) + 1.5*d + d*z + rnorm(n)
A <- rd.qte(y=y,x=cbind(x,z),d=d,x0=0,z0=c(0,1),tau=tlevel,bdw=2,bias=1)


QTE.RD documentation built on Aug. 30, 2025, 9:06 a.m.