rdq {QTE.RD}R Documentation

Estimate the QTE under the RDD

Description

rdq estimates QTE under the RDD with or without covariates. This function is used by rd.qte to generate QTE estimates.

Usage

rdq(y, x, d, x0, z0 = NULL, tau, h.tau, cov)

Arguments

y

a numeric vector, the outcome variable.

x

a vector (or a matrix) of covariates, the first column is the running variable.

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 is included, z0 = 1 may indicate the female subgroup.

tau

a vector of quantiles of interest.

h.tau

the bandwidth values (specified for each quantile level).

cov

either 0 or 1. Set cov=1 if covariates are present in the model; otherwise set cov=0.

Value

A list with elements:

qte

QTE estimates.

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).

bcoe.p

quantile regression coefficients on the right side of x_{0}.

bcoe.m

quantile regression coefficients on the left side of x_{0}.

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)
hh = rep(2,length(tlevel))
rdq(y=y,x=x,d=d,x0=0,z0=NULL,tau=tlevel,h.tau=hh,cov=0)

# (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)
rdq(y=y,x=cbind(x,z),d=d,x0=0,z0=c(0,1),tau=tlevel,h.tau=hh,cov=1)


[Package QTE.RD version 1.0.0 Index]