*! version 1.1.0 22jan2022

Title

sivqr -- Smoothed instrumental variables quantile regression

Syntax

sivqr
depvar
[varlist1]
(varlist2 =
varlist_iv)
[if] [in]
[weight]
,
quantile(#)
[options]

As in ivregress, varlist1 is the list of exogenous regressors (or control variables),
varlist2 is the list of endogenous regressors, and
varlist_iv is the list of excluded instruments.

Model
quantile(#) estimate # quantile

bandwidth(#) manually set smoothing bandwidth; default is to use plug-in bandwidth

reps(#) perform # bootstrap replications; default is reps(20)

noconstant suppress constant term

Reporting
level(#) set confidence level; default is 95 or c(level) as set by set level

logiterations report iterations of numerical solver

nodots suppress bootstrap replication dots

Advanced
seed(#) set random-number seed to #

initial(matname) manually set initial coefficient values for numerical search

by is allowed; see by.

pweights, iweights, and fweights are allowed; see weight.

Description

sivqr estimates quantile regression models in which one or more of the regressors are endogenously determined.
It is like qreg, but allowing for instrumental variables to address endogeneity.
Or, it is like ivregress, but estimating structural coefficients or causal effects at different levels (quantiles) of unobserved heterogeneity (rank variable).
As with both qreg and ivregress, the structural model is implicitly linear in the regressors (varlist1 and varlist2), but those regressors may themselves be nonlinear functions of variables in the raw data.
The estimator uses smoothing to improve both computational speed and statistical precision.
The methodology was proposed and studied by Kaplan and Sun (2017).

Options

Model

quantile(#) specifies the quantile to be estimated and should be a number between 0 and 1, exclusive, or alternatively a number between 1 and 100 interpreted as a percentile.
For example, quantile(0.5) corresponds to the median, as does quantile(50).

bandwidth(#) manually specifies the desired smoothing bandwidth.
If a numerical solution cannot be found with the desired bandwidth, then the bandwidth is increased (as little as possible) until it can.
For example, bandwidth(0) uses the smallest possible amount of smoothing.
Alternatively, with no bandwidth specified, an automatic plug-in bandwidth is computed based on Kaplan and Sun (2017).
Though not optimal in every case, the plug-in bandwidth tries to minimize the estimator's mean squared error and has performed well in simulations, and it often greatly reduces computation time compared to bandwidth(0).

reps(#) specifies the number of bootstrap replications for estimating the variance-covariance matrix and standard errors.
With the default reps(0) heteroskedasticity-robust analytic standard errors are reported.
The Bayesian bootstrap of Rubin (1981) is used; it is a valid frequentist bootstrap that also has a nonparametric Bayesian interpretation.

noconstant; see
[R] estimation options.

Reporting

level(#); see
[R] estimation options.

logiterations displays each iteration of the numerical solver, solvenl(), for the main estimation. Usually this is not valuable information.

nodots suppresses display of the replication dots (as in bootstrap)

Advanced

seed(#) sets the random-number seed (as in bootstrap).

initialize(matname) sets the initial coefficient values for the numerical search, using the values stored in the matrix (row vector) named matname.
If not specified, then qreg is used to generate initial values.

Examples

Setup

. webuse hsng2

Run median IVQR with defaults (plug-in bandwidth, analytic Std. Err.)

. sivqr rent pcturban (hsngval = faminc i.region), q(0.5)

Additional examples are in the sivqr_examples.do file.

Stored results

sivqr stores the following in e():

Scalars

e(N) number of observations

e(reps) number of bootstrap replications

e(bwidth) smoothing bandwidth used

e(bwidth_req) smoothing bandwidth requested (or plug-in value)

e(bwidth_max) maximum plug-in bandwidth (of 3)

e(q) quantile level (0<e(q)<1)

Macros

e(cmd) sivqr

e(vcetype) "Robust" or "Bootstrap"

e(depvar) name of dependent variable

e(instd) instrumented variable(s)

e(insts) instrument(s)

e(constant) noconstant if specified

e(wtype) weight type

e(wexp) weight expression

e(title) title in estimation output

e(exogr) exogenous regressors

e(properties) b V or else only b if reps(0)

Matrices

e(b) estimated coefficient vector

e(V) estimated variance-covariance matrix of the estimator, unless reps(0)

Functions

e(sample) marks estimation sample

sivqr stores the following in r():

Scalars

r(level) confidence level

Matrices

r(table) table of results

Author

David M. Kaplan
Department of Economics, University of Missouri

kaplandm@missouri.edu
https://kaplandm.github.io

References

Kaplan, D. M., and Sun, Y. 2017.
Smoothed Estimating Equations for Instrumental Variables Quantile Regression.
Econometric Theory 33: 105-157.

URL: https://doi.org/10.1017/S0266466615000407

Rubin, D. B. 1981. The Bayesian Bootstrap. Annals of Statistics 9: 130-134.

URL: https://projecteuclid.org/euclid.aos/1176345338