# A first-stage representation for instrumental variables
quantile regression

Javier Alejo111IECON-Universidad de la República, Montevideo, Uruguay. E-mail:
<EMAIL_ADDRESS>Antonio F. Galvao222Michigan State University, East
Lansing, USA. E-mail<EMAIL_ADDRESS>Gabriel Montes-Rojas333CONICET and
Instituto Interdisciplinario de Economía Política, Universidad de Buenos
Aires, Ciudad Autónoma de Buenos Aires, Argentina. E-mail:
<EMAIL_ADDRESS>
###### Abstract

This paper develops a first-stage linear regression representation for the
instrumental variables (IV) quantile regression (QR) model. The quantile
first-stage is analogous to the least squares case, i.e., a linear projection
of the endogenous variables on the instruments and other exogenous covariates,
with the difference that the QR case is a weighted projection. The weights are
given by the conditional density function of the innovation term in the QR
structural model, conditional on the endogeneous and exogenous covariates, and
the instruments as well, at a given quantile. We also show that the required
Jacobian identification conditions for IVQR models are embedded in the
quantile first-stage. We then suggest inference procedures to evaluate the
adequacy of instruments by evaluating their statistical significance using the
first-stage result. The test is developed in an over-identification context,
since consistent estimation of the weights for implementation of the first-
stage requires at least one valid instrument to be available. Monte Carlo
experiments provide numerical evidence that the proposed tests work as
expected in terms of empirical size and power in finite samples. An empirical
application illustrates that checking for the statistical significance of the
instruments at different quantiles is important. The proposed procedures may
be specially useful in QR since the instruments may be relevant at some
quantiles but not at others.

Keywords: Quantile regression, instrumental variables, first-stage.

JEL: C13, C23.

##  1 Introduction

Instrumental variables (IV) methods are one of the main workhorses to estimate
causal relationships in empirical analysis. Standard IV regression methods
stress that for instruments to be valid they must be exogenous and must be
related to the endogenous variables. The latter condition is usually evaluated
by using a first-stage auxiliary regression, where a linear model is used to
make inference on the degree of association of the IV and the endogenous
variables. While this is usually accepted as a valid procedure, its
representation is in fact specific to the two-stage least squares (2SLS) model
for mean models. This paper derives a first-stage representation for quantile
regression (QR) models.

Several IV methods have been proposed in QR to solve endogeneity when the
covariates are correlated with the error term in a regression model.
Chernozhukov and Hansen (2004, 2005, 2006, 2008) (CH hereafter) develop an
instrumental variables quantile regression (IVQR) procedure that has been
applied in several contexts. It is one of the most prolific approaches in
terms of subsequent work, as it provides a general procedure to use IV for
endogeneity of regressors (see, e.g., Chernozhukov, Hansen and Jansson, 2007,
2009; Galvao, 2011; Chetverikov, Larsen and Palmer, 2016). We refer to
Chernozhukov, Hansen and Wüthrich (2020) for an overview of IVQR.444There is
also a more recent literature on GMM QR, see e.g., Firpo et al. (2021) and
references therein.

CH comment that their method is a simple solution to a 2SLS analog.555This has
been formally established in Galvao and Montes-Rojas (2015). However, the
first-stage of the IVQR estimator has not been explicitly considered, as it is
implemented as an inverse QR estimator. The IVQR estimator contrasts to
alternative procedures where the first-stage is implemented. For instance,
Amemiya (1982), Powell (1983), Chen and Portnoy (1996), and Kim and Muller
(2004) use an explicit first-stage that fits the endogenous variable(s) as a
function of exogenous covariates and IV, and this is then plugged in a second-
stage. Lee (2007) also adopts a two-step control-function approach where in
first step consists of estimation of the residuals of the reduced-form
equation for the endogenous explanatory variable. Ma and Koenker (2006)
present an estimator for a recursive structural equation model.

This paper builds on the IVQR estimator and shows that a first-stage
regression model can be explicitly recovered from the CH IVQR estimator. The
first-stage IVQR (FS-IVQR) is a linear projection of the endogenous variables
on the instruments and other exogenous variables, with the difference that the
QR case is a weighted regression, that is, it has the representation of a
weighted least squares (WLS) regression of the endogenous variable(s) on the
IV and the exogenous regressors. The weights are given by the conditional
density function of the innovation term in the QR structural model,
conditional on the endogeneous and exogenous covariates together with the
instruments, at a given quantile. This result provides a clear analogy between
the first-stage in 2SLS and IVQR. The derivation of the result is simple. We
write the IVQR model as a constrained Lagrangian optimization problem and show
that one of the restrictions that must be satisfied is the analogue of the
first-stage.

The CH IVQR method requires an identification condition that is based on the
full-rank of the Jacobian for the exogeneity of the instruments. The lack of
identification when the Jacobian is not full rank implies that estimating the
parameters can be extremely difficult and the first-order asymptotics can be a
poor guide of the actual sampling distributions (see e.g. Dufour, 1997). In
this paper, we show that a necessary condition for the Jacobian identification
conditions for IVQR models are embedded in the quantile first-stage
representation. Hence, the FS-IVQR representation is directly related to the
Jacobian requirement of CH IVQR.

We propose a two-step FS-IVQR estimator. The practical implementation of the
estimator is straightforward and as follows. First, from the IVQR one
estimates the conditional density function at a selected quantile, which
produces an estimate of the weights. The weighting factor is estimated from
the IVQR errors using, for instance, sparsity or kernel methods (see, e.g.,
Koenker (2005)). Second, a standard WLS regression is implemented by
regressing the endogenous variable on the instruments and exogenous variables
with weights from the first step – this is parallel to the first-stage model
used in 2SLS, but using weights. We derive the limiting distribution of the
two-step FS-IVQR estimator and show that, under some standard regularity
conditions, it is asymptotically normal.

The first-stage regression for conditional average models has been used as a
natural framework to evaluate the validity of instruments since one can test
for their statistical significance, that is, how the IV impact the endogenous
variable(s). Based on the proposed FS-IVQR model, we suggest an analogous test
procedure to assess the validity of the IV for given quantiles. In particular,
we test the statistical significance of the FS-IVQR coefficients. This is a
test for the Jacobian identification condition with the null hypothesis that
the required rank condition is not satisfied – the coefficients are equal to
zero. A simple Wald statistic can be used to test this null, and we show that
it has an asymptotic Chi-square distribution. Nevertheless, the implementation
of the test requires consistent estimation of the weights, which in turn
requires at least one valid available instrument. The requirement of
consistent estimation of weights in the first-stage QR exposes a caveat with
the IVQR model, and hence, we suggest practical use of the test in an over-
identification context, that is, when at least one valid instrument is
available. In spite of this issue, testing using the first-stage QR allows for
a procedure in empirical work to evaluate the degree of association of the IV
to the endogenous variable that is parallel to the standard first-stage in
two-stage least squares (FS-2SLS).

The requirement of consistent estimation of weights in the QR first-stage
leads to two important conclusions of this paper. First, it is difficult to
derive an analogous F-statistic type rule-of-thumb for categorizing weak
instruments as in, among others, Staiger and Stock (1997), Sanderson and
Windmeijer (2016), and Lee et al. (2020), for ordinary least-squares (OLS)
models (see Stock and Yogo (2005) for an extensive discussion). A complete
parallel testing procedure to evaluate the validity of IV in the QR case only
works when one is able to estimate the structural parameters – and
consequently the weights – consistently, which in turn requires at least one
valid instrument. Therefore, dropping the valid instrument requirement is a
very interesting line of future research for investigating the weak
instruments problem. Second, an important conclusion for practical work is
that weak identification robust inference procedures, as in Chernozhukov and
Hansen (2008), Jun (2008), Chernozhukov, Hansen and Jansson (2009), and
Andrews and Mikusheva (2016), are a very important avenue for empirical
applications using QR instrumental variables models. We strongly suggest the
use of the QR first-stage and testing proposed here along with the weak
identification robust inference procedures in empirical applications.

One important feature of the procedure developed in this paper is that
instruments could be statistically insignificant in FS-2SLS, but they could
still be related to the endogenous variable in the IVQR set-up. The reason is
that the FS-2SLS test only evaluates a mean effect, but the FS-IVQR, because
of its specific weighting procedure, allows for different first-stage
coefficients across quantiles. As a result, the IV could be relevant at some
quantiles but not for the mean (and vice-versa), an issue that has been
discussed in Chesher (2003) and subsequent literature. The test developed here
thus allows inference on the validity of the IV for the exogeneity condition
across quantiles, rather than only a mean effect.

We use a Monte Carlo exercise to evaluate the finite sample performance of the
proposed tests. The tests have correct size in all cases studied, where the
structural parameters can be consistently estimated under the null hypothesis.
We consider alternative cases where there is no identification under the null.
The tests have excellent power properties. In particular these experiments
highlight the case where the FS-2SLS test for the mean-based model suggests
the instrument is not valid, but the proposed FS-IVQR procedure finds it is
for some quantiles.

As an empirical illustration, we apply the FS-IVQR estimator to the Card
(1995) data on instrumenting education using college proximity. The analysis
reveals heterogeneity in the significance of the IV across quantiles. In fact,
while the 2SLS analysis shows that one instrument (proximity to 2-year
college) is not statistically significant in the first-stage, it is indeed for
high quantiles.

The paper is organized as follows. Section 2 briefly reviews the CH IVQR
estimator, rewrites that estimator as a constrained minimization problem and
derives the first-stage representation for the IVQR. Then it shows that the
FS-IVQR estimator is equivalent to the identification condition in CH. Section
3 presents the first-stage test for validity of instruments. Section 4
discusses its empirical implementation and derives the estimators’ asymptotic
distribution. Section 5 provides finite sample Monte Carlo evidence. Section 6
applies the proposed tests to an empirical problem. Finally, Section 7
concludes.

##  2 A first-stage representation for IVQR

###  2.1 The IVQR estimator and its variants

Let $(y,d,x,z)$ be random variables, where $y$ is a scalar outcome of
interest, $d$ is a $1\times r$ vector of endogenous variables, $x$ is a
$1\times k$ vector of exogenous control variables, and $z$ is a $1\times p$
vector of exogenous instrumental variables, with $p\geq r$. Define $w=(x,z)$
and $s=(d,x,z)$.

Chernozhukov and Hansen (2006) developed estimation and inference for a
generalization of the QR model with endogenous regressors. A linear
representation of the model takes the following form

$y=d\alpha_{0}(u_{d})+x\beta_{0}(u_{d}),\
u_{d}|x,z\sim\textnormal{Uniform}(0,1),$ (1)

where $u_{d}$ is the nonseparable error or rank and the subscript indicates
the endogenous covariates of the model. Under some regularity conditions, CH
establish the following IV identification function

$P[y\leq d\alpha_{0}(\tau)+x\beta_{0}(\tau)|x,z]=P[u_{d}\leq\tau|x,z]=\tau.$
(2)

Although each parameter and estimator is indexed by the quantile
$\tau\in(0,1)$, throughout the paper we will suppress the dependence on
$\tau$.

The restriction in (2) can be used to estimate the parameters of interest. For
a given quantile $\tau$, the population IVQR estimator for model in (1), is
given by

$\underset{\alpha}{{\rm min}}{\|\gamma(\alpha)\|_{A}},$

where

$(\beta(\alpha),\gamma(\alpha))=\underset{\beta,\gamma}{\rm
argmin}\;\textnormal{E}\left[\rho_{\tau}(y-d\alpha-x\beta-z\gamma)\right],$

and $\rho_{\tau}(u)=u(\tau-\bm{1}(u<0))$ is the check function, and
$\|\cdot\|_{A}=\cdot^{\prime}A\cdot$ is the Euclidean distance for any
positively definite matrix $A$ of dimension $p\times p$.

As noted by Chernozhukov and Hansen (2006, p.501), the IVQR estimator is
asymptotically equivalent to a particular GMM estimator where the QR first
order conditions are used as moment conditions. In particular, it would
involve a Z-estimator solving

$\displaystyle\textnormal{E}\left[x^{\prime}\left(\bm{1}[y-d\alpha-x\beta<0]-\tau\right)\right]$
$\displaystyle=\bm{0}_{k},$ (3)
$\displaystyle\textnormal{E}\left[z^{\prime}\left(\bm{1}[y-d\alpha-x\beta<0]-\tau\right)\right]$
$\displaystyle=\bm{0}_{p},,$ (4)

where $\bm{1}(\cdot)$ is the indicator function. Here $\bm{0}_{k}$ and
$\bm{0}_{p}$ are null vectors with dimensions $k\times 1$ and $p\times 1$,
respectively.

Different estimators have been proposed in the GMM framework based on
identifying the structural parameters from equations (3)–(4). Kaplan and Sun
(2017), Chen and Lee (2018) and de Castro et al. (2019) provide general
estimation procedures based on smoothing techniques of the non-differentiable
indicator function. However, the constructed estimator differs from the CH
IVQR one. This can be seen in the fact that the term $z\gamma$ is not
considered altogether from the regression model. Our procedure follows the CH
estimator and their specific notation.

###  2.2 The IVQR estimator as a constrained minimization problem

The IVQR estimator proposed by Chernozhukov and Hansen (2006), for a given
quantile $\tau$, can be written as a constrained minimization problem, where
the constraints are the moment conditions, that is,

$\underset{(\alpha,\beta,\gamma)}{{\rm min}}{\|\gamma\|_{A}},$ (5)

subject to

$\displaystyle\textnormal{E}\left[x^{\prime}\left(\bm{1}[y-d\alpha-x\beta-z\gamma<0]-\tau\right)\right]$
$\displaystyle=\bm{0}_{k},$ (6)
$\displaystyle\textnormal{E}\left[z^{\prime}\left(\bm{1}[y-d\alpha-x\beta-z\gamma<0]-\tau\right)\right]$
$\displaystyle=\bm{0}_{p}.$ (7)

Now we write this constrained optimization as a Lagrangian problem666See
Pouliot (2019) and Kaido and Wüthrich (2021) for recent contributions that
tackle the problem of practical implementation of the IVQR methods. as

$\displaystyle\mathcal{L}(\alpha,\beta,\gamma,\lambda_{x},\lambda_{z})$
$\displaystyle=\|\gamma\|_{A}+\lambda_{x}\textnormal{E}\left[x^{\prime}(\bm{1}[y-d\alpha-x\beta-z\gamma<0]-\tau)\right]$
(8)
$\displaystyle+\lambda_{z}\textnormal{E}\left[z^{\prime}(\bm{1}[y-d\alpha-x\beta-z\gamma<0]-\tau)\right],$

where $\lambda_{x}$ is a $1\times k$ vector and $\lambda_{z}$ is a $1\times p$
vector. Therefore, the IVQR estimator is given by the empirical counterpart of

$\underset{(\theta,\lambda_{x},\lambda_{z})}{\rm
argmin}\;\mathcal{L}(\theta,\lambda_{x},\lambda_{z}),$

where $\theta=(\alpha^{\prime},\beta^{\prime},\gamma^{\prime})^{\prime}$.

The first derivatives of the Lagrangian in equation (8) are

$\displaystyle\partial\mathcal{L}/\partial\alpha$
$\displaystyle=-\left\\{\lambda_{x}\textnormal{E}\left[f\cdot
x^{\prime}d\right]+\lambda_{z}\textnormal{E}\left[f\cdot
z^{\prime}d\right]\right\\}^{\prime}$ (9)
$\displaystyle\partial\mathcal{L}/\partial\beta$
$\displaystyle=-\left\\{\lambda_{x}\textnormal{E}\left[f\cdot
x^{\prime}x\right]+\lambda_{z}\textnormal{E}\left[f\cdot
z^{\prime}x\right]\right\\}^{\prime}$ (10)
$\displaystyle\partial\mathcal{L}/\partial\gamma$
$\displaystyle=\left\\{2\gamma^{\prime}A-\lambda_{x}\textnormal{E}\left[f\cdot
x^{\prime}z\right]-\lambda_{z}\textnormal{E}\left[f\cdot
z^{\prime}z\right]\right\\}^{\prime}$ (11)
$\displaystyle\partial\mathcal{L}/\partial\lambda_{x}$
$\displaystyle=\textnormal{E}\left[x^{\prime}(\bm{1}[y-d\alpha-x\beta-z\gamma<0]-\tau)\right]^{\prime}$
(12) $\displaystyle\partial\mathcal{L}/\partial\lambda_{z}$
$\displaystyle=\textnormal{E}\left[z^{\prime}(\bm{1}[y-d\alpha-x\beta-z\gamma<0]-\tau)\right]^{\prime},$
(13)

where $f:=f_{u_{\tau}}(0|d,x,z)$ denotes the density function of
$u_{\tau}:=y-d\alpha_{0}(\tau)-x\beta_{0}(\tau)$ conditional on $s=(d,x,z)$,
evaluated at the $\tau$-th conditional quantile, which is zero. Note that $f$
is specific for each quantile $\tau$. This density function plays a central
role in what follows.

The solution should have all equations above equal to zero when assuming an
interior solution as in Assumption 1 below. Thus, from equation (10),

$\lambda_{x}^{\prime}=-\left(\textnormal{E}[f\cdot
x^{\prime}x]\right)^{-1}\left(\textnormal{E}[f\cdot
x^{\prime}z]\right)\lambda_{z}^{\prime}.$ (14)

Then, replacing (14) in (11),

$\left(\textnormal{E}[f\cdot z^{\prime}z]-\textnormal{E}[f\cdot
z^{\prime}x](\textnormal{E}[f\cdot x^{\prime}x])^{-1}\textnormal{E}[f\cdot
x^{\prime}z]\right)\lambda_{z}^{\prime}=2A\gamma,$

such that

$\lambda_{z}^{\prime}=2\left(\textnormal{E}[f\cdot
z^{\prime}z]-\textnormal{E}[f\cdot z^{\prime}x](\textnormal{E}[f\cdot
x^{\prime}x])^{-1}\textnormal{E}[f\cdot x^{\prime}z]\right)^{-1}A\gamma.$ (15)

Finally, replacing (15) in (9),

$\displaystyle\textnormal{E}\left[f\cdot
d^{\prime}x\right]\lambda_{x}^{\prime}+\textnormal{E}\left[f\cdot
d^{\prime}z\right]\lambda_{z}^{\prime}$
$\displaystyle=2\left\\{\textnormal{E}\left[f\cdot
d^{\prime}z\right]-\textnormal{E}\left[f\cdot
d^{\prime}x\right](\textnormal{E}[f\cdot
x^{\prime}x])^{-1}\textnormal{E}[f\cdot x^{\prime}z]\right\\}\times$
$\displaystyle\left\\{\textnormal{E}[f\cdot z^{\prime}z]-\textnormal{E}[f\cdot
z^{\prime}x](\textnormal{E}[f\cdot x^{\prime}x])^{-1}\textnormal{E}[f\cdot
x^{\prime}z]\right\\}^{-1}A\gamma=\bm{0}_{r},$

where $\bm{0}_{r}$ is a $r\times 1$ vector of zeros.

Therefore, we can restate the IVQR problem for
$(\alpha^{\prime},\beta^{\prime},\gamma^{\prime})^{\prime}$ as a system of
three equations given by

$\displaystyle\left\\{\textnormal{E}\left[f\cdot
d^{\prime}z\right]-\textnormal{E}\left[f\cdot
d^{\prime}x\right](\textnormal{E}\left[f\cdot
x^{\prime}x\right])^{-1}\textnormal{E}\left[f\cdot
x^{\prime}z\right]\right\\}\times$
$\displaystyle\left\\{\textnormal{E}\left[f\cdot
z^{\prime}z\right]-\textnormal{E}\left[f\cdot
z^{\prime}x\right](\textnormal{E}\left[f\cdot
x^{\prime}x\right])^{-1}\textnormal{E}\left[f\cdot
x^{\prime}z\right]\right\\}^{-1}A\gamma=\bm{0}_{r}$ (16)
$\displaystyle\textnormal{E}\left[x\cdot(\bm{1}[y-d\alpha-x\beta-z\gamma<0]-\tau)\right]=\bm{0}_{k}$
(17)
$\displaystyle\textnormal{E}\left[z\cdot(\bm{1}[y-d\alpha-x\beta-z\gamma<0]-\tau)\right]=\bm{0}_{p}.$
(18)

###  2.3 First-stage IVQR parameters

Given equations (16)–(18) above, we can see that (16) provides a first-stage
representation of the IVQR model. This can be written as

$\delta^{\prime}A\gamma=\bm{0}_{r},$ (19)

where

$\displaystyle\delta$ $\displaystyle:=\left\\{\textnormal{E}\left[f\cdot
z^{\prime}z\right]-\textnormal{E}\left[f\cdot
z^{\prime}x\right](\textnormal{E}\left[f\cdot
x^{\prime}x\right])^{-1}\textnormal{E}\left[f\cdot
x^{\prime}z\right]\right\\}^{-1}$
$\displaystyle\left\\{\textnormal{E}\left[f\cdot
z^{\prime}d\right]-\textnormal{E}\left[f\cdot
z^{\prime}x\right](\textnormal{E}\left[f\cdot
x^{\prime}x\right])^{-1}\textnormal{E}\left[f\cdot
x^{\prime}d\right]\right\\}.$ (20)

Here $\delta$ is a $p\times r$ matrix. Notice that equation (20) is a least-
squares projection coefficient. In particular, the representation in (20) is a
weighted projection, where the endogenous variable(s), $d$, is(are) regressed
on the IV, $z$, and the exogenous variables, $x$. This is the analogue to the
first-stage in the 2SLS case, with the difference that the QR case is a
weighted regression. The weights are given by the conditional density function
of the innovation term in the QR structural model, conditional on the
endogeneous and exogenous covariates together with the instruments.

Hence, for each endogeneous variable, say $d_{j}$ for $j=1,2,...,r$,
$\delta_{j}$ in equation (20) can be recovered as the solution to the
following optimization problem

$\mu_{j}:=(\psi_{j},\delta_{j})=\underset{\psi,\delta}{\rm
argmin}\;\textnormal{E}\left[f\cdot(d_{j}-x\psi-z\delta)^{2}\right].$ (21)

Note that the parameter $\delta$ also depends on
$\theta=(\alpha^{\prime},\beta^{\prime},\gamma^{\prime})^{\prime}$, through
the conditional density function $f$ at quantile $\tau$. Thus, this first-
stage representation depends on the structural (second-stage) parameters, and
as such, it is different from the 2SLS case in mean regression models.

We notice that the first-stage in equation (21) is different from those in the
existing literature using two-stage regressions for conditional quantile
models. Amemiya (1982), Powell (1983), Chen and Portnoy (1996), and Kim and
Muller (2004) propose different two step procedures in which the first step
fits the endogenous variable(s) as a function of exogenous covariates and IV,
and this is then plugged in a second-stage. Nevertheless, these papers use
least squares without weighting or standard quantile regression in the first-
stage. Our procedure derives the first-stage from the IVQR set-up, thus
confirming that a first-stage (albeit different) is part of the model.

###  2.4 Relation to the Jacobian condition

Now we consider the relationship between the first-stage derived in the
previous section, in particular equation (20), and the rank identification
conditions for the IVQR estimator of CH. For simplification, we consider a
model without additional exogenous covariates $x$.

As discussed in CH, the IVQR optimization problem is asymptotically equivalent
to solving the following moment condition

$\Pi((\alpha,\gamma),\tau)=\textnormal{E}\left[z^{\prime}(\bm{1}[y-d\alpha-z\gamma<0]-\tau)\right]=\bm{0}_{p}.$

To establish the asymptotic properties of the IVQR estimator, it is required
that the Jacobian matrices,
$\frac{\partial}{\partial\alpha}\Pi((\alpha,\gamma),\tau)$ and
$\frac{\partial}{\partial\gamma}\Pi((\alpha,\gamma),\tau)$, are continuous and
full column rank (see below the conditions for the derivation of the
asymptotic properties of the estimator, in particular, Assumption 1, item R3).
We show here that these conditions are embedded in the FS-IVQR representation.

The rank Jacobian conditions are

$\displaystyle\textnormal{rank}\left(\frac{\partial\Pi((\alpha,\gamma),\tau)}{\partial\alpha}\right)$
$\displaystyle=\textnormal{rank}\left(\textnormal{E}[f\cdot
z^{\prime}d]\right)\geq r,$
$\displaystyle\textnormal{rank}\left(\frac{\partial\Pi((\alpha,\gamma),\tau)}{\partial\gamma}\right)$
$\displaystyle=\textnormal{rank}\left(\textnormal{E}[f\cdot
z^{\prime}z]\right)=p.$

The first equation implies that for the case of one endogeneous variable,
$r=1$, $\textnormal{E}[f\cdot z^{\prime}d]$ has at least one non-zero column,
and the second equation requires $p$ noncollinear valid instruments. Now
notice that from the FS-IVQR representation given by equation (20), in the
case without exogenous regressors, simplifies to:

$\textnormal{E}[f\cdot z^{\prime}d]=\textnormal{E}[f\cdot z^{\prime}z]\delta.$

Therefore, the matrices involved in the rank conditions directly appear in
representation (20). Also, if the FS-IVQR parameter $\delta=0$, then the rank
conditions cannot be satisfied. Note that this is a necessary condition, but
not a sufficient one. Furthermore, by checking how close $\delta$ is to zero
one is in fact evaluating the strength of the identification condition.

###  2.5 Further intuition on the FS-IVQR

The restriction in equation (19) provides a natural framework to evaluate the
relevance of the instruments in IVQR models.

First, the first-stage regression representation in (21) is a weighted linear
projection, where the weights are the conditional density function of the
innovation term in the QR structural model, conditional on the endogeneous and
exogenous covariates together with the instruments. This exposes a caveat of
the QR IV model. In order to estimate the parameters in (21) consistently, one
needs a consistent estimate of the density $f$, and hence at least one valid
instrument must be available to the researcher. This is in contrast with the
standard conditional average models where the first-stage is a simple OLS
regression without weights. The required weights in the QR case will be
further discussed below when we suggest a test for the validity of the IV.

Second, notice that the parameter $\delta$ captures the strength of the
instrument in the sense it measures the correlation between the instrument $z$
and the endogenous variable $d$ weighted by the density function $f$. This is
the QR counterpart of the first-stage partial correlation of $z$ on the
endogenous variables $d$ for the 2SLS. As noted by Galvao and Montes-Rojas
(2015) the CH set-up is equivalent to the 2SLS in least-squares models. In
fact the CH estimator is the QR counterpart of a 2SLS estimator. The
expression above also shows that there is an implicit first-stage, similar to
that in 2SLS problems. As such, this provides an analytical expression to
evaluate the relevance of the IV. When the instrument is valid,
$\delta\neq\bm{0}_{p\times r}$.

Third, note that the instrument $z$ does not belong in the structural quantile
model (1), hence $\gamma=\bm{0}_{p\times r}$ can be used for identification, a
key feature of the CH IVQR estimator. Equation (19) also shows that when
$\delta=\bm{0}_{p\times r}$, the value of $\gamma$ is irrelevant, and
therefore it cannot be used in the IVQR procedure to solve endogeneity. As
such, $\delta\neq\bm{0}_{p\times r}$ is a necessary condition for the IV to
have a purpose in the CH set-up. Therefore, a test for the validity of the
instruments can be based on a test for statistical significance of $\delta$.

Finally, another way of gaining intuition on the test is the following. Assume
that $r=1$ (i.e. only one endogenous variable), then (19) is in fact equal to
0, a scalar. If we further assume that $A=I_{p}$, then

$\sum_{q=1}^{p}\delta_{q}\gamma_{q}=0,$ (22)

where $\delta=[\delta_{1},\ldots,\delta_{p}]^{\prime}$ is the column vector
that has the first-stage effect of all IV on $d$. Note again that if
$\delta=\bm{0}_{p\times 1}$, then the vector $\gamma$ could have any value and
its implied restrictions would be irrelevant.

##  3 Formulation of the test for validity of the IV

In this section we suggest tests for the validity of the IV using the first-
stage representation. The formulation of the test proposed in this paper is
based on the condition given in equation (16) together with the first-stage
IVQR representation in equation (20). A test for validity of the instruments
for $p$ instruments can be based on the null hypothesis

$H_{0}:\delta_{0}=\bm{0}_{p\times r},$ (23)

against the alternative

$H_{A}:\delta_{0}\neq\bm{0}_{p\times r}.$ (24)

We highlight that, differently from the 2SLS, the first-stage IVQR in (21) is
for a given quantile $\tau$. Thus, for the same variables $d$ and instruments
$z$, the strength of the instruments may vary across different quantiles. This
variation is captured by the weights $f$.

Note that the procedure works for $r\geq 1$, that is for one or more than one
endogenous variables. In the $r>1$ case, separate tests could be applied as in
2SLS analysis where there may be a different first-stage for each endogeneous
variable. To simplify the procedures below we assume that $r=1$, that is,
there is only one endogenous variable.

The expressions of the null and the alternative hypotheses in (23) and (24),
respectively, lead to the following testing procedure.

When $H_{0}$ is true, under suitable regularity conditions, $\hat{\delta}$
converges in probability to $\bm{0}_{p\times r}$ for a given $\tau$. On the
other hand, when $H_{A}$ is true, $\hat{\delta}$ converges in probability to
$\delta_{0}\neq\bm{0}_{p\times r}$. Therefore, it is reasonable to reject
$H_{0}$ if the magnitude of $\hat{\delta}$ is suitably large.

A natural choice to test $H_{0}$ against $H_{1}$ for the case of $r=1$ is the
Wald statistic as

$T_{n}=n\hat{\delta}^{\prime}\\{V_{\delta}\\}^{-1}\hat{\delta},$ (25)

where $V_{\delta}$ is the asymptotic covariance matrix of
$\sqrt{n}\hat{\delta}$ under $H_{0}$. In practice, $V_{\delta}$ is replaced by
a suitable consistent estimate. We will discuss the practical implementation
as well the limiting distribution in the next section.

##  4 Empirical implementation and asymptotic distribution

In this section we propose a two step estimator for the first-stage
instrumental variables quantile regression (FS-IVQR), consider its empirical
implementation, and derive the estimators’ asymptotic distribution. The two
steps estimation procedure consists of estimating the conditional density
using the IVQR model in the first step, and in the second step employing a
weighted least squares (WLS) regression. For simplicity of exposition, we
present the case of $r=1$, i.e. one endogenous variable, but as discussed
above the case of $r>1$ can be implemented using separate regressions.

###  4.1 FS-IVQR Estimator

The FS-IVQR estimator requires a consistent estimator of $\mu$ in (21), which
will be based on WLS based on the estimator of $f$, at a given quantile of
interest $\tau$. The estimator has two steps as following:

1) In the first step we obtain
$\hat{\theta}=(\hat{\alpha},\hat{\beta}^{\prime},\hat{\gamma}^{\prime})^{\prime}$
from the CH estimator,

$\hat{\alpha}=\underset{\alpha}{{\rm argmin}}{\|\hat{\gamma}(\alpha)\|_{A}},$

where

$(\hat{\beta}(\alpha),\hat{\gamma}(\alpha))=\underset{\beta,\gamma}{\rm
argmin}\;\frac{1}{n}\sum_{i=1}^{n}\left[\rho_{\tau}(y_{i}-d_{i}\alpha-
x_{i}\beta-z_{i}\gamma)\right].$

Provided that the $\tau$th conditional quantile function of $y|s$ is linear,
as in (1), then for $h_{n}\to 0$ we can consistently estimate the parameters
of the $\tau\pm h_{n}$ conditional quantile functions by $\hat{\theta}(\tau\pm
h_{n})$. And the density $f_{i}:=f_{u_{\tau}}(0|d=d_{i},x=x_{i},z=z_{i})$ can
thus be estimated by the difference quotient

$\hat{f}_{i}=\frac{2h_{n}}{s_{i}\left(\hat{\theta}(\tau+h_{n})-\hat{\theta}(\tau-
h_{n})\right)}.$ (26)

The estimation in (26) is a natural extension of sparsity estimation methods,
suggested by Hendricks and Koenker (1992).777We note that a kernel estimator
for the conditional density, as in Powell (1991), can be used. The procedure
would use the error term
$\hat{u}_{\tau}:=y-d\hat{\alpha}(\tau)-x\hat{\beta}(\tau)$ from the first step
CH IVQR estimator. We describe the procedure using the sparsity estimation for
simplicity. The estimator is discussed in further details in Zhou and Portnoy
(1996) and Koenker (2005). We introduce the simplifying notation
$\hat{f}_{i}:=\hat{f}_{u_{\tau}}(0|s=s_{i})$.888We are assuming that there is
only one endogenous variable, $r=1$. Otherwise the analysis below should be
repeated separately for each endogenous variable as there will be a different
first-stage for each one. The bandwidth for the density estimation can be
chosen heuristically as a scaled version of Hall and Sheather (1988):

$h_{n}=2n^{-1/3}\Phi^{-1}\left(0.975\right)^{2/3}\left[\frac{3}{2}\cdot\frac{\phi\left\\{\Phi^{-1}(\tau)\right\\}^{4}}{2\Phi^{-1}(\tau)^{2}+1}\right]^{1/3}.$

2) In the second step the parameters of interest $\delta$ can be obtained from
a feasible WLS as

$\hat{\mu}:=(\hat{\psi},\hat{\delta})=\underset{\psi,\delta}{\rm
argmin}\;\frac{1}{n}\sum_{i=1}^{n}\left[\hat{f}_{i}\cdot(d_{i}-x_{i}\psi-
z_{i}\delta)^{2}\right].$ (27)

Equation (27) produces $\hat{\delta}$ which is the main object of interest.

Define $Y$, $X$, $D$ and $Z$ as the matrices formed from a random sample of
$\\{y_{i},d_{i},x_{i},z_{i}\\}_{i=1}^{n}$. Similarly define $W=[X,Z]$. Define
the weighting diagonal matrix

$\hat{V}=\begin{bmatrix}\hat{f}_{1}&&\\\ &\ddots&\\\
&&\hat{f}_{n}\end{bmatrix}.$

Then, the estimator in (27) above can be written in a simple matrix notation
as

$\hat{\mu}=(W^{\prime}\hat{V}W)^{-1}W^{\prime}\hat{V}D.$ (28)

Notice that if $f_{i}$ is a constant for all $i$, then the proposed FS-IVQR
method should deliver same estimates as FS-2SLS for the mean. This would
happen, for example, in the case of $i.i.d.$ innovations in the second-stage
structural model. Thus, there will be differences between the two estimators
only when $f_{i}$ varies across $i$, that is, when the weighting factor is not
a constant. Example 1 (location model) Appendix B shows a case where the
density function is a constant. A typical example where the weights are not
constant across individuals is the location-scale model, see Examples 2 and 3
in Appendix B.

###  4.2 Asymptotic distribution

In this subsection, we derive the asymptotic distribution of the proposed
estimator. The asymptotic properties of the IVQR estimator can be found in
Chernozhukov and Hansen (2006) and the assumptions therein are those required
for inference. We consider Assumption 2 in Chernozhukov and Hansen (2006,
pp.501–502), that we reproduce here for convenience. It imposes conditions for
$\theta_{0}$ to be identified and estimated.

######  Assumption 1.

R1. Sampling. $\\{y_{i},x_{i},d_{i},z_{i}\\}$ are $iid$ defined on a
probability space and take values in a compact set.
R2. Compactness and convexity. For all $\tau\in(0,1)$,
$(\alpha,\beta,\gamma\in{\rm
int}(\mathcal{A}\times\mathcal{B}\times\mathcal{G})$ is compact and convex.
R3. Full rank and continuity. $y$ has bounded conditional density (conditional
on $w$), and for $\theta=(\alpha,\beta,\gamma)$,

$\Pi(\theta,\tau):=\textnormal{E}\left[(\tau-\bm{1}(y<d\alpha+x\beta+z\gamma)\cdot[x,z]\right],$

Jacobian matrices
$\frac{\partial}{\partial(\alpha^{\prime},\beta^{\prime})}\Pi(\theta,\tau)$
and
$\frac{\partial}{\partial(\beta^{\prime},\gamma^{\prime})}\Pi(\theta,\tau)$
are continuous and have full rank, uniformly over
$\mathcal{A}\times\mathcal{B}\times\mathcal{G}$ and the image of
$\mathcal{A}\times\mathcal{B}\times\mathcal{G}$ under the mapping
$(\alpha,\beta)\mapsto\Pi(\theta,\tau)$ is simply connected. Assume that
$\theta_{0}=(\alpha_{0},\beta_{0}^{\prime},\gamma_{0}^{\prime})^{\prime}$ is
the unique solution to the CH problem.

We impose additional conditions for deriving the limiting properties of the
feasible first-stage estimator in (27) using the sparsity estimation in (26).

######  Assumption 2.

Let $\varepsilon_{i}:=d_{i}-x_{i}\psi_{0}-z_{i}\delta_{0}$, with
$\textnormal{E}[\varepsilon_{i}|w_{i}]=0$, and
$\textnormal{E}[\varepsilon_{i}^{2}|w_{i}]=\sigma_{i}^{2}$. Also, let
$f_{i}:=f_{\theta_{0}}(y-s\theta_{0}|s=s_{i})$ and assume that
$\textnormal{E}[|f_{i}^{-2}w_{i}\varepsilon_{i}|]<\infty$. Let
$\Omega_{f\sigma}:=\textnormal{E}[f_{i}^{2}\sigma_{i}^{2}w_{i}w_{i}^{\prime}]$
and $\Omega_{f}:=\textnormal{E}[f_{i}w_{i}w_{i}^{\prime}]$. The limits
$\lim_{n\to\infty}\frac{1}{n}\sum_{i}^{n}f_{i}^{2}\sigma_{i}^{2}w_{i}w_{i}^{\prime}=\Omega_{f\sigma}$
and
$\lim_{n\to\infty}\frac{1}{n}\sum_{i}^{n}f_{i}w_{i}w_{i}^{\prime}=\Omega_{f}$
exist and are nonsingular (and hence finite).

Assumption 2 contains conditions for establishing consistency and asymptotic
normality of the proposed estimator. The next result presents an intermediate
result.

######  Lemma 1.

Under Assumptions 1–2, as $n\rightarrow\infty$, $h_{n}\rightarrow 0$ and
$nh_{n}^{2}\rightarrow\infty$,

$\sqrt{n}\left(\hat{\mu}-\mu_{0}\right)\stackrel{{\scriptstyle
d}}{{\rightarrow}}\mathcal{N}\left(\bm{0}_{k+p},V(\mu_{0})\right),$ (29)

where $\mu_{0}:=(\psi_{0},\delta_{0})=\underset{\psi,\delta}{\rm
argmin}\;\textnormal{E}\left[f\cdot(d-x\psi-z\delta)^{2}\right]$ and
$V(\mu_{0})=\Omega_{f}^{-1}\Omega_{f\sigma}\Omega_{f}^{-1}$ is the asymptotic
covariance matrix.

###### Proof.

In Appendix A. ∎

###  4.3 Asymptotic distribution of the test statistic

Consider a subset of the instruments, $p_{1}<p$, and consider a partition of
$\delta=[\delta_{1}^{\prime},\delta_{2}^{\prime}]^{\prime}$ of the
corresponding first-stage parameters of interest, with dimensions $p_{1}$ and
$p_{2}$ (with $p=p_{1}+p_{2}$), respectively. Consider a $p_{1}\times(k+p)$
matrix $R=[\bm{0}_{p_{1}\times k},\bm{I}_{p_{1}},\bm{0}_{p_{1}\times p_{2}}]$
where $\bm{I}_{p_{1}}$ is an identity matrix of dimension $p_{1}\times p_{1}$.
Thus, $R\mu=\delta_{1}$ is the subvector of interest. Let $\hat{V}(\hat{\mu})$
be a consistent estimator of $V(\mu_{0})$, which can be obtained from the WLS
procedure. The next result derives the limiting distribution of the test
statistic in equation (25).

######  Proposition 1.

Consider Assumptions 1–2, $n\rightarrow\infty$, $h_{n}\rightarrow 0$ and
$nh_{n}^{2}\rightarrow\infty$. Furthermore, assume that $dim(z)=p>p_{1}\geq
1$. Then, under $\delta_{2}\neq\bm{0}_{p_{2}}$ and
$H_{0}:\delta_{1}=\bm{0}_{p_{1}}$ and local alternatives
$H_{A}:\delta_{1}=\bm{a}_{p_{1}}/\sqrt{n}$,

$T_{n}=n\left(R\hat{\mu}\right)^{\prime}\\{R\hat{V}(\hat{\mu})R^{\prime}\\}^{-1}\left(R\hat{\mu}\right)\stackrel{{\scriptstyle
d}}{{\rightarrow}}\chi^{2}_{p_{1}}(\bm{a}_{p_{1}}).$ (30)

###### Proof.

In Appendix A. ∎

Computation of the test statistic (25) requires a non-parametric estimator of
$f$, the conditional density of $u_{\tau}|d,x,z$ evaluated at the specific
quantile of interest $\tau$. Given that the weights need to be estimated, the
proposed FS-IVQR has specific properties when testing under the null
hypothesis of an invalid instrument. The condition on the number of IV being
larger than the number of parameters tested in the null hypothesis is required
for consistent estimation of $\theta$ under the null, which in turn, is used
for the consistent estimation of $f$.

######  Remark 1.

As noted above, testing for the null (23) that the instruments are not valid
requires a consistent estimate of the density $f$, which in turn requires at
least one valid instrument, and hence the restrictions on the availability of
at least one valid instrument as well as on the number of IV being larger than
the number of parameters tested in the null hypothesis. Hence, due to the
required estimation of weights in the first stage, it is difficult to
establish a complete analogous F-statistic type rule-of-thumb for categorizing
weak instruments as in Staiger and Stock (1997), and subsequent variants as
Sanderson and Windmeijer (2016), Lee et al. (2020) and others for OLS models
(see Stock and Yogo (2005) for an extensive discussion). Nevertheless,
dropping the multiple instruments requirement is a very interesting line of
future research for investigating the weak instruments problem. Therefore, we
suggest to practitioners to use the methods for the QR first-stage together
with the robust inference procedures for weak identification in QR models
proposed in Chernozhukov and Hansen (2008), Jun (2008), Chernozhukov, Hansen
and Jansson (2009) and Andrews and Mikusheva (2016).

##  5 Monte Carlo experiments

We analyze in this section the performance of the proposed test with finite
samples through a series of Monte Carlo simulation exercises. The data
generating process (DGP) has the following location-scale model:

$\displaystyle y_{i}$ $\displaystyle=d_{i}+x_{i}+(1+d_{i})u_{i},$ (31)
$\displaystyle d_{i}$ $\displaystyle=c_{1}+az_{1i}+\phi
z_{2i}+(1+bz_{1i})v_{i},$ (32)

where $x_{i}$, $z_{1i}$ and $z_{2i}$ are three independent variables with
distribution $U(0,1)$; $u_{i}$ and $v_{i}$ have standard bivariate normal
distribution with correlation $0.50$. The constant parameter $c_{1}=10$ is set
to a large value to satisfy the monotonicity assumption. Equations (31)–(32)
specify a model where there could be pure location or location-scale
specifications in the first stage, thus allowing the instruments to have
different effects on the endogenous variable. Note that the parameters $a$ and
$b$ determine the type of effect that the instrument $z_{1}$ has on the
endogenous covariate $d$. For example, if $a\neq 0$ and $b=0$ the instrument
$z_{1}$ has a pure location effect on $d$ (pure location shift model), while
if $a=0$ and $b\neq 0$ the effect is only on the variance of the endogenous
covariate (pure scale shift model).

In all cases we consider tests for $H_{0}:\delta_{1}=0$ where this is the
first-stage parameter associated with the $z_{1}$ instrument defined in the
previous sections. We consider two different cases to investigate the
numerical properties of the tests. In the first case, $\phi=1$, there is a
second instrument, $z_{2}$, such that the model correctly identifies the
parameters in the structural equation (31) for all possible values of $a$ and
$b$, even under the case that $a=b=0$. In the second case, we set $\phi=0$,
and therefore, under the null hypothesis the consistent estimation of the
weights $f$ is problematic. Also, in this case, when $a=b=0$, there is no
valid available instrument.

We will consider three different test statistics from different estimators.
First, for comparison purposes, we present a Wald test for the coefficient in
$z_{1}$ using a simple regression model of $d$ on $(x,z_{1},z_{2})$ in a
standard 2SLS framework, denoted FS-2SLS. Second, we test for
$H_{0}:\delta_{1}=0$ using the true density function, $f$, as weights, that
is, using the true $\theta_{0}$, denoted FS-IVQR (true density). We note that
this is not observed in practice, and we include these results for comparison
purposes. Our proposed test studied in the previous section is the third one,
denoted FS-IVQR (sparsity), where we use the sparsity function estimation
described above. Note that the three tests differ only in the weighting
procedure used in the regression of $d$ on $(x,z_{1},z_{2})$ or $(x,z_{1})$.

Table 1–2 show the empirical size (i.e. $a=b=0$) of the computed test with
2000 simulations for $n=\\{500,1000\\}$ and for the quantiles
$\tau=\\{0.25,0.50,0.75\\}$.

Consider first the case where there is a second instrument, $\phi=1$ in Table
1. The tests have approximately correct empirical size in all cases. As such
they clearly evaluate if the instrument $z_{1}$ exerts an effect on the
endogenous variable $d$. In all cases they have a similar performance to the
FS-2SLS case.

Now consider the case where there is no available second instrument, $\phi=0$
in Table 2. The idea of this experiment is to evaluate the test performance
when there is lack of identification under the null. In this case, the weights
in the structural model cannot be estimated consistently under the null. Since
the proposed test evaluates the relationship between $z_{1}$ and $d$, the main
issue is whether this relationship can be evaluated in other than the OLS
model. The simulations show that the size is correct for the sparsity
estimator. This result suggests that the test can be used even when the
structural parameters cannot be estimated under the null (because $z_{1}$ does
not solve the endogeneity problem).

This is not a general result, however, but it illustrates the role of the
density function as a weighting factor. In order to explore this, we consider
three examples in Appendix B closely related to the DGP used in the Monte
Carlo experiments. When the instrument $z$ is available we should be
estimating the correct structural parameters and $f_{u_{\tau}}(0|d,x,z)$ where
$u_{\tau}=y-Q_{\tau}(y|d,x,z)$. However, the case where, under the null, $z$
is invalid would be equivalent to the case where there are no instruments
available. That is, we would not be able to solve the endogeneity in the
second-stage. Note that, for this case, the density function that will be
implicitly used is that of $u^{*}_{\tau}=y-Q_{\tau}(y|d,x)$. The examples in
Appendix B compare $f_{u^{*}_{\tau}}(0|d,x)$ with
$f_{u_{\tau}}(0|d,x,z)$.999Let $\tilde{\alpha}$ and $\tilde{\beta}$ be the
parameters that result from the estimation of the biased structural model
without instruments, $Q_{\tau}(y|d,x)=d\tilde{\alpha}+x\tilde{\beta}$. Note
that $u_{\tau}=y-Q_{\tau}(y|d,x,z)=y-d\alpha_{0}-x\beta_{0}$ can be written as
$y-d\tilde{\alpha}-x\tilde{\beta}-bias(d,x)$, where
$bias(d,x)=d(\alpha_{0}-\tilde{\alpha})+x(\beta_{0}-\tilde{\beta})$ such that
$u_{\tau}=u^{*}_{\tau}-bias(d,x)$. The partial results suggest that if
$f_{u_{\tau}}(0|d,x,z)$ and $f_{u^{*}_{\tau}}(0|d,x)$ are proportional to each
other when they vary with $d$, we could implement the first-stage test under
the null of all IV being invalid.

Table 1: Rejection rate of the null hypothesis using $a=b=0$ and $\phi=1$

$\tau$ | Size | $n=500$ |  | $n=1000$
---|---|---|---|---
|  | FS-2SLS | True $f$ | Sparsity $f$ |  | FS-2SLS | True $f$ | Sparsity $f$
0.25 | 0.10 | 0.100 | 0.104 | 0.101 |  | 0.104 | 0.105 | 0.108
| 0.05 | 0.052 | 0.051 | 0.053 |  | 0.054 | 0.056 | 0.054
| 0.01 | 0.014 | 0.015 | 0.016 |  | 0.008 | 0.009 | 0.010
0.50 | 0.10 | 0.100 | 0.104 | 0.109 |  | 0.096 | 0.095 | 0.095
| 0.05 | 0.056 | 0.055 | 0.059 |  | 0.056 | 0.056 | 0.053
| 0.01 | 0.011 | 0.011 | 0.010 |  | 0.011 | 0.013 | 0.012
0.75 | 0.10 | 0.097 | 0.103 | 0.101 |  | 0.102 | 0.104 | 0.100
| 0.05 | 0.047 | 0.051 | 0.049 |  | 0.054 | 0.054 | 0.058
| 0.01 | 0.011 | 0.009 | 0.013 |  | 0.009 | 0.010 | 0.012

Note: Rejection rates of 2000 Monte Carlo experiments.

Table 2: Rejection rate of the null hypothesis using $a=b=0$ and $\phi=0$

$\tau$ | Size | $n=500$ |  | $n=1000$
---|---|---|---|---
|  | FS-2SLS | True $f$ | Sparsity $f$ |  | FS-2SLS | True $f$ | Sparsity $f$
0.25 | 0.10 | 0.110 | 0.114 | 0.107 |  | 0.093 | 0.097 | 0.101
| 0.05 | 0.057 | 0.060 | 0.062 |  | 0.054 | 0.057 | 0.054
| 0.01 | 0.013 | 0.012 | 0.016 |  | 0.013 | 0.013 | 0.010
0.50 | 0.10 | 0.107 | 0.107 | 0.108 |  | 0.097 | 0.097 | 0.094
| 0.05 | 0.059 | 0.059 | 0.059 |  | 0.049 | 0.050 | 0.051
| 0.01 | 0.017 | 0.018 | 0.020 |  | 0.010 | 0.009 | 0.009
0.75 | 0.10 | 0.101 | 0.100 | 0.108 |  | 0.102 | 0.109 | 0.105
| 0.05 | 0.049 | 0.050 | 0.053 |  | 0.054 | 0.051 | 0.052
| 0.01 | 0.010 | 0.010 | 0.009 |  | 0.008 | 0.009 | 0.011

Note: Rejection rates of 2000 Monte Carlo experiments.

To analyze the empirical power of the tests, we performed 2000 simulations
only for the case with $n=1000$ and we calculated the rejection rates of the
proposed procedure for the quantiles $\tau=\\{0.25,0.50,0.75\\}$. As benchmark
we also use the test rejection rates obtained in the FS-2SLS method, i.e., the
Wald test of an OLS regression of $d$ on $z_{1}$. The results appear in
Figures 1 and 2. For each figure we have two blocks, (i) and (ii), where in
(i) we evaluate a pure location first-stage model of $z_{1}$ on $d$ using
$a=\\{0,0.10,...,0.90,1\\}$ and $b=0$, and in (ii) we set $a=0$ and we vary
$b=\\{0,0.10,...,0.90,1\\}$ such that $z_{1}$ has only a scale effect on $d$.

We first consider the case where there is a second valid instrument $\phi=1$.
Figure 1, block (i) pure location first-stage, shows that the FS-IVQR power
computed with true and estimated densities behaves similarly to FS-2SLS. That
is, they correctly reject as $a$ increases. The estimated density model has
slightly less power than the one with the true density. For block (ii), the
results of the FS-IVQR differ when we are in the presence of a pure-scale
model for $d|z_{1}$. Note that in this case there is no relationship between
$d$ and $z_{1}$ at the mean (FS-2SLS), but it does affect the other points of
the conditional distribution. Therefore, the first-stage of 2SLS does not find
any relationship between the endogenous variable and the instrument while the
FS-IVQR estimators (both true and estimated weights) are able to correctly
detect it.

Finally, consider the last case when $\phi=0$ in Figure 2. The FS-IVQR tests
also work in this case. In both (i) and (ii) cases, the tests detect an
association between the instrument and the endogenous variable. In case (ii)
the FS-IVQR rejects as $b$ increases while FS-2SLS does not. As noted in Table
2 the test works even for the case where $a=b=0$ and the endogeneity problem
in the structural estimators cannot be solved.

Figure 1: Power for $H_{0}:\delta_{1}=0$ (model with $\phi=1$) Figure 2: Power
for for $H_{0}:\delta_{1}=0$ (model with $\phi=0$)

##  6 Empirical application: Card (1995) college proximity as an instrument
for education

In this section we show an application of the proposed test to a Mincer
equation to estimate returns to schooling. The data used is taken from Card
(1995) and correspond to 3010 individuals of the US National Longitudinal
Survey of Young Men.101010Downloaded from
http://davidcard.berkeley.edu/data_sets/proximity.zip Following the same
specification of that paper, the model describes wages as a function of the
years of education and other exogenous controls such as work experience, race
and a set of geographic and regional variables. A classic problem with this
model is that ability is unobservable and therefore its omission induces a
potential bias due to endogeneity of the OLS estimator. Specification errors
have analogous consequences on QR estimators, as analyzed by Angrist,
Chernozhukov, and Fernández-Val (2006). Card (1995) proposes to implement an
IV strategy using two measures of proximity to the university as external
variables to the wage equation. For this application we set $A$, the weighting
matrix in the CH-IVQR estimator, equal to the inverse of the asymptotic
covariance matrix of $\hat{\gamma}$, as suggested by CH. The grid used in the
minimization problem is $\alpha(\tau)=\\{0,0.004,0.008,...,0.992,0.996,1\\}$.

Table 3: Returns to schooling (Card, 1995)

| 2SLS | IV Quantile Regression
---|---|---
|  | $\tau=0.25$ | $\tau=0.50$ | $\tau=0.75$
| First-stage estimates
Lived Near 2-year College in 1966 | 0.123 | 0.0644 | 0.471*** | 0.154**
| (0.0774) | (0.129) | (0.0704) | (0.0709)
Lived Near 4-year College in 1966 | 0.321*** | 0.380*** | 0.298*** | 0.140*
| (0.0878) | (0.146) | (0.101) | (0.0737)
Experience | -0.412*** | -0.450*** | -0.489*** | -0.494***
| (0.0337) | (0.0871) | (0.0247) | (0.0344)
Experience-Squared | 0.000848 | -0.000681 | 0.00457*** | 0.00449**
| (0.00165) | (0.00496) | (0.00122) | (0.00192)
Black indicator | -0.945*** | -0.926*** | -0.886*** | -0.753***
| (0.0939) | (0.162) | (0.113) | (0.0701)
Constant | 16.60*** | 16.42*** | 17.00*** | 16.68***
| (0.242) | (0.393) | (0.173) | (0.211)
| Second-stage estimates
Education | 0.157*** | 0.176*** | 0.268*** | 0.104
| (0.0524) | (0.0521) | (0.0271) | (0.0662)
Experience | 0.119*** | 0.120*** | 0.180*** | 0.0932***
| (0.0227) | (0.0248) | (0.0140) | (0.0341)
Experience-Squared | -0.00236*** | -0.00201*** | -0.00337*** | -0.00221***
| (0.000347) | (0.000347) | (0.000352) | (0.000438)
Black indicator | -0.123** | -0.110** | -0.00925 | -0.148***
| (0.0520) | (0.0519) | (0.0342) | (0.0469)
Constant | 3.237*** | 2.698*** | 1.400*** | 4.360***
| (0.883) | (0.870) | (0.466) | (1.119)
Observations | 3,010 | 3,010 | 3,010 | 3,010

Source: Card (1995). Notes: Standard errors in parentheses. SE robust for OLS
estimates. *** $p<0.01$, ** $p<0.05$, * $p<0.1$. Regional and geographic
dummies are used but omitted.

Table 3 shows the results of the first-stage to check if the IV are valid,
together with the estimated second-stage results. The first column corresponds
to the 2SLS mean model and the next ones are the regressions proposed for IVQR
for $\tau\in\\{0.25,0.50,0.75\\}$. The results shows that the first instrument
(lived near 2-year college in 1966) is not relevant for the low quantiles and
the mean but it is significant for middle and high quantiles. Also, note that
although the second instrument (lived near 4-year college in 1966) rejects the
null hypothesis for the mean, this variable has different degree of
significance across quantiles. In particular, this is for $\tau=0.75$ where
the instrument is relevant only at 10% significance. These results are very
important since although the proximity to the university seems to be a valid
instrument to identify the causal effect of education on the mean, our test
also indicates a certain limitation when the object of study is to evaluate
the impact on the lower part of conditional distribution of wages. Therefore,
this alerts for the quality of the asymptotic properties of the IVQR estimates
in the presence of invalid instruments.

##  7 Conclusions

This paper proposes a first-stage model and a testing procedure to evaluate
the degree of association between the IV and the endogenous regressor(s) in
the IVQR estimator. The procedure developed here allows to evaluate
instruments in a similar vein to that in 2SLS models for the conditional
average, that is, by looking at the statistical significance of the
instruments in the first-stage regression. In turn, this will allow to
investigate IV validity for specific quantiles. Nevertheless, due to the
requirement of consistent estimation of the weights in the first stage, it is
important to notice that the testing requires the availability of at least of
instrument. This caveat for QR IV models leads to two conclusions. First, it
is difficult to derive a complete analogous F-statistic type rule-of-thumb for
categorizing weak instruments. We leave this problem to future research.
Second, we strongly suggest the use of weak identification robust inference
procedures for QR models for practical work applying QR instrumental
variables. Monte Carlo experiments clearly illustrate that one may encounter
cases where the IV are not valid for the mean, but are still valid for some
quantiles. The same issue appears in the empirical application.

The analysis may be extended in the following two directions. First, this
approach can be used to identify quantile-specific treatment effects, where an
IV estimate being significant at some quantiles corresponds to a particular
effect of a treatment. Second, the procedure outlined here could be combined
with the second-stage inference to produce statistics similar to the Staiger
and Stock (1997) F-statistics rule-of-thumb. In particular, to study weak
instruments issues in QR models.

## Appendix A: Proofs

###### Proof of Lemma 1..

First, consider an estimator of the parameter $\mu$ using the true weighting
matrix $V$ as

$V=\begin{bmatrix}f_{1}&&\\\ &\ddots&\\\ &&f_{n}\end{bmatrix},$ (33)

that is given by the following

$\tilde{\mu}=(W^{\prime}VW)^{-1}W^{\prime}VD,$

where $W=[X,Z]$. Replacing $D$ by $(W\mu_{0}+\varepsilon)$ in the definition
of $\tilde{\mu}$ we have that

$\sqrt{n}(\tilde{\mu}-\mu)=\left(\frac{W^{\prime}VW}{n}\right)^{-1}\frac{W^{\prime}V\varepsilon}{\sqrt{n}}.$

By the Slutsky’s Theorem, the proof of the lemma requires showing that

$\frac{W^{\prime}VW}{n}\stackrel{{\scriptstyle p}}{{\rightarrow}}\Omega_{f},$
(34)

and

$\frac{W^{\prime}V\varepsilon}{\sqrt{n}}\stackrel{{\scriptstyle
d}}{{\rightarrow}}N(0,\Omega_{f\sigma}).$ (35)

To show (34), its left side has the $(j,k)$ element given by

$\frac{1}{n}\sum_{i=1}^{n}f_{i}w_{ij}w_{ik}\stackrel{{\scriptstyle
p}}{{\rightarrow}}\textnormal{E}\left[f_{i}w_{ij}w_{ik}\right],$

by the Law of Large Numbers and Assumption 2. To show (35), first note that

$\textnormal{E}\left[W^{\prime}V\varepsilon\right]=\textnormal{E}\left[W^{\prime}V\textnormal{E}[\varepsilon|W]\right]=0,$

by Assumption 2. Furthermore, $W^{\prime}V\varepsilon$ is a sum of i.i.d.
random vectors $f_{\theta_{0}}(s_{i})\cdot w_{i}\cdot\varepsilon_{i}$ with
common covariance matrix having the $(j,k)$ element

$\displaystyle
Cov\left(f_{i}w_{ij}\varepsilon_{i},f_{i}w_{ik}\varepsilon_{i}\right)$
$\displaystyle=\textnormal{E}\left[f_{i}^{2}w_{ij}w_{ik}\varepsilon_{i}^{2}\right]=\textnormal{E}\left[f_{i}^{2}w_{ij}w_{ik}\textnormal{E}[\varepsilon_{i}^{2}|w_{i}]\right]$
$\displaystyle=\textnormal{E}\left[f_{i}^{2}w_{ij}w_{ik}\sigma_{i}^{2}\right].$

Thus, each vector $f_{i}\cdot w_{i}\cdot\varepsilon_{i}$ has covariance matrix
$\Omega_{f\sigma}$. Therefore, by the Multivariate Central Limit Theorem, (35)
holds.

Finally, we have to show that using estimated weights does not affect the
liming distribution. To establish that consider the estimator with the
estimated weights as following

$\hat{\mu}=(W^{\prime}\hat{V}W)^{-1}W^{\prime}\hat{V}D,$

such that

$\sqrt{n}(\hat{\mu}-\mu)=\left(\frac{W^{\prime}\hat{V}W}{n}\right)\frac{W^{\prime}\hat{V}\varepsilon}{\sqrt{n}}.$
(36)

First, we show that

$\frac{W^{\prime}\hat{V}\varepsilon}{\sqrt{n}}-\frac{W^{\prime}V\varepsilon}{\sqrt{n}}\stackrel{{\scriptstyle
p}}{{\rightarrow}}0.$ (37)

Note that

$\frac{W^{\prime}(\hat{V}-V)\varepsilon}{\sqrt{n}}=n^{-1/2}\sum_{i=1}^{n}w_{i}\varepsilon_{i}\left(\hat{f}_{i}-f_{i}\right).$
(38)

We want to show that the right hand side of (38) is $o_{p}(1)$. Using the
sparsity function estimator in (26) along with some calculations, we have that

$\hat{f}_{i}=f_{i}+\frac{2h_{n}}{f_{i}^{2}}s_{i}(\hat{\theta}-\theta)+o_{p}((nh^{2})^{-2/3}).$

We refer the reader to Ota, Kato, and Hara (2019) for details on the remainder
term.

Hence, using the previous equation, the $j$th component of the right hand side
of equation (38) can be written as

$\sqrt{n}(\hat{\theta}_{j}-\theta_{0,j})2h_{n}\frac{1}{n}\sum_{i=1}^{n}\frac{1}{f_{i}^{2}}w_{ij}\varepsilon_{i}.$

The first factor $\sqrt{n}(\hat{\theta}_{j}-\theta_{0,j})=o_{p}(1)$ by
Assumption 1 and CH. Moreover, note that the average of the i.i.d. variables
$f_{i}^{-2}w_{i}\varepsilon_{i}$ obeys the Law of Large Numbers by the moment
restrictions in Assumption 2, and the result follows.

Next, we show that

$\frac{W^{\prime}\hat{V}W}{n}-\frac{W^{\prime}VW}{n}\stackrel{{\scriptstyle
p}}{{\rightarrow}}0,$ (39)

which follows from the same argument as above.

The convergences (37) and (39) are enough to show that the right-hand side of
(36) satisfies

$\left(\frac{W^{\prime}\hat{V}W}{n}\right)\frac{W^{\prime}\hat{V}\varepsilon}{\sqrt{n}}-\left(\frac{W^{\prime}VW}{n}\right)\frac{W^{\prime}V\varepsilon}{\sqrt{n}}\stackrel{{\scriptstyle
p}}{{\rightarrow}}0$

just by making simple use of the equality

$\hat{a}\hat{b}-ab=\hat{a}(\hat{b}-b)+(\hat{a}-a)b.$

Finally, Slutsky’s theorem yields the result. ∎

###### Proof of Proposition 1..

The proof of this result is simple. It follows from observing that by Lemma 1,

$\sqrt{n}(\hat{\mu}-\mu_{0})\stackrel{{\scriptstyle
d}}{{\rightarrow}}N\left(\bm{0},V(\mu_{0})\right).$

Notice that $R\mu=\delta_{1}$, hence under the null hypothesis,

$\sqrt{n}(R\hat{\mu}-\bm{0})\stackrel{{\scriptstyle
d}}{{\rightarrow}}N\left(\bm{0},RV(\mu_{0})R^{\prime}\right).$

Let $\hat{V}(\hat{\mu})$ be a consistent estimator of $V(\mu_{0})$, and
$V_{\delta_{1}}:=RV(\mu_{0})R^{\prime}$, then by the Slutsky’s theorem,

$T_{n}=n\left(\hat{\delta}_{1}\right)^{\prime}\\{V_{\delta_{1}}\\}^{-1}\left(\hat{\delta}_{1}\right)\stackrel{{\scriptstyle
d}}{{\rightarrow}}\chi^{2}_{p_{1}}(\bm{a}_{p_{1}}).$

∎

## Appendix B: Examples of weighting factors

#### 1\. Location model

Consider a pure location model, using two equations

$\displaystyle y$ $\displaystyle=d+u,$ $\displaystyle d$ $\displaystyle=az+v,$

with $(u,v)\sim N(0,0,1,1,\rho)$ a bivariate normal with zero mean, unit
variance and correlation parameter $\rho$ and $z\sim N(0,1)$. Then, it follows
that $d\sim N(0,1+a^{2})$ and $y\sim N(0,2+a^{2}+2\rho)$.

Consider now the model where we condition on both $(d,z)$. For this case,
$u|d,z\sim N(\rho v,(1-\rho^{2}))$ by the marginal of the bivariate normal
density. Then,

$Q_{\tau}(u|d,z)=\rho v+\sqrt{1-\rho^{2}}\Phi^{-1}(\tau).$

Then, $u_{\tau}=y-Q_{\tau}(y|d,z)=u-Q_{\tau}(u|d,z)$. Note that
$\textnormal{E}(u_{\tau}|d,z)=\textnormal{E}(u_{\tau}|d,z)-Q_{\tau}(u|d,z)=-\sqrt{1-\rho^{2}}\Phi^{-1}(\tau)$.
Thus, the density is

$f_{u_{\tau}}(U|d,z)=\frac{1}{\sqrt{1-\rho^{2}}}\phi\left(\frac{U+\sqrt{1-\rho^{2}}\Phi^{-1}(\tau)}{\sqrt{1-\rho^{2}}}\right),$

where $\phi()$ is the density function of a standard normal. If we evaluate it
at $0$,

$f_{u_{\tau}}(0|d,z)=\frac{1}{\sqrt{1-\rho^{2}}}\phi\left(\Phi^{-1}(\tau)\right).$

Now consider the joint density of $(u,d)\sim N(0,0,1,1+a^{2},\kappa)$, where
$\kappa=\frac{\rho}{\sqrt{1+a^{2}}}$. Then, it follows that $u|d\sim
N(\textnormal{E}(u|d),Var(u|d))$, where $\textnormal{E}(u|d)=\kappa d$ and
$Var(u|d)=(1-\kappa^{2})$.

As such, we can obtain the quantiles of interest,

$Q_{\tau}(y|d)=d+\kappa d+\Phi^{-1}(\tau)(1-\kappa^{2})^{1/2}.$

Note that without endogeneity, i.e. $\rho=0$, then $\kappa=0$, and the correct
$\tau$-quantile model should be

$Q_{\tau}(y|d,\rho=0)=d+\Phi^{-1}(\tau).$

Now, $u^{*}_{\tau}=y-Q_{\tau}(y|d)=d+u-(d+\kappa
d+\Phi^{-1}(\tau)(1-\kappa^{2})^{1/2})=u-\kappa
d-\Phi^{-1}(\tau)(1-\kappa^{2})^{1/2}$. Then,
$\textnormal{E}(u^{*}_{\tau}|d)=-\Phi^{-1}(\tau)(1-\kappa^{2})^{1/2}$, and
$Var(u^{*}_{\tau}|d)=Var(u|d)=(1-\kappa^{2})$.

Then,

$f_{u^{*}_{\tau}}(U|d)=\frac{1}{\sqrt{(1-\kappa^{2})}}\phi\left(\frac{U-\textnormal{E}(u^{*}_{\tau}|d)}{\sqrt{Var(u^{*}_{\tau}|d)}}\right),$

such that,

$f_{u^{*}_{\tau}}(0|d)=\frac{1}{\sqrt{(1-\kappa^{2})}}\phi\left(\Phi^{-1}(\tau)\right).$

In all cases, $f_{u^{*}_{\tau}}(0|d)$ and $f_{u_{\tau}}(0|d,z)$ are constant
that do not change with $d$ or $z$. It is interesting to evaluate when $a=0$,
such that $(1-\kappa^{2})=(1-\rho^{2})$. Note that in this case,
$f_{u^{*}_{\tau}}(0|d)=f_{u_{\tau}}(0|d,z)$.

#### 2\. Location-scale model 1

Now consider a location-scale model of the form

$\displaystyle y$ $\displaystyle=d+(1+cd)u,$ $\displaystyle d$
$\displaystyle=az+v,$

where $a$ and $c$ are parameters. As in the previous case $(u,v)\sim
N(0,0,1,1,\rho)$. Then, $u|(d,z)\sim u|v\sim N(\rho v,1-\rho^{2})$. Thus,
$Q_{\tau}(u|d,z)=\rho v+\sqrt{1-\rho^{2}}\Phi^{-1}(\tau)$. Note that it does
not depend on $z$.

In this case, $Q_{\tau}(y|d,z)=d+(1+cd)Q_{\tau}(u|d,z)$, and then,
$u_{\tau}=y-Q_{\tau}(y|d,z)=(1+cd)(u-Q_{\tau}(u|d,z))$.

As such, we can obtain,

$f_{u_{\tau}}(U|d,z)=\frac{1}{|1+cd|\sqrt{1-\rho^{2}}}\phi\left(\frac{U+(1+cd)\sqrt{1-\rho^{2}}\Phi^{-1}(\tau)}{(1+cd)\sqrt{1-\rho^{2}}}\right).$

If we evaluate it at $0$,

$f_{u_{\tau}}(0|d,z)=\frac{1}{|1+cd|\sqrt{1-\rho^{2}}}\phi\left(\Phi^{-1}(\tau)\right).$

Note that this depends $d$, and then, the weights are not uniform.

Now, consider the of $u|d$. Consider first the joint distribution of
$(u,d)\sim N(0,0,1,1+a^{2},\kappa)$ where $\kappa=\rho/\sqrt{1+a^{2}}$. Now,
$u|d\sim N(\kappa d,(1-\kappa^{2}))$, then $\textnormal{E}(u|d)=\kappa d$ and
$Var(u|d)=(1-\kappa^{2})$.

For this case let
$u^{*}_{\tau}=y-Q_{\tau}(y|d)=d+(1+cd)u-d-(1+cd)Q_{\tau}(u|d)=(1+cd)(u-Q_{\tau}(u|d))$.
Since $u|d$ is Gaussian then $(1+cd)(u-\kappa
d-\Phi^{-1}(\tau)(1-\kappa^{2})^{1/2})$. Then,
$\textnormal{E}(u^{*}_{\tau}|d)=(1+cd)(-\Phi^{-1}(\tau)(1-\kappa^{2})^{1/2})$
and $Var(u^{*}_{\tau}|d)=(1+cd)^{2}(1-\kappa^{2})$. As such, we can obtain,

$f_{u^{*}_{\tau}}(U|d)=\frac{1}{|1+cd|\sqrt{1-\kappa^{2}}}\phi\left(\frac{U+(1+cd)(1-\kappa^{2})^{1/2}\Phi^{-1}(\tau)}{(1+cd)(1-\kappa^{2})^{1/2}}\right).$

If we evaluate it at $0$,

$f_{u^{*}_{\tau}}(0|d)=\frac{1}{|1+cd|\sqrt{1-\kappa^{2}}}\phi\left(\Phi^{-1}(\tau)\right).$

Note that both $f_{u_{\tau}}(0|d,z)$ and $f_{u^{*}_{\tau}}(0|d)$ share the
same relationship with $d$. In fact, the weighting procedure will be
equivalent, as they are proportional to each other.

#### 3\. Location-scale model 2

Now consider a location-scale model where both the first and second stage are
affected in the variance component,

$\displaystyle y$ $\displaystyle=d+(1+cd)u,$ $\displaystyle d$
$\displaystyle=az+(1+bz)v,$

where $a$, $b$, and $c$ are parameters. As in the previous case $(u,v)\sim
N(0,0,1,1,\rho)$. Define $w=(1+bz)v$ and note that $(u,w|z)\sim
N(0,0,1,(1+bz)^{2},\rho)$. Then, $u|d,z\sim u|w,z\sim N(\rho v,1-\rho^{2})$.
Thus, $Q_{\tau}(u|d,z)=\rho v+\sqrt{1-\rho^{2}}\Phi^{-1}(\tau)$. Note that it
does not depend on $b$.

In this case, $Q_{\tau}(y|d,z)=d+(1+cd)Q_{\tau}(u|d,z)$, and then,
$u_{\tau}=y-Q_{\tau}(y|d,z)=(1+cd)(u-Q_{\tau}(u|d,z))$.

As such, we can obtain,

$f_{u_{\tau}}(U|d,z)=\frac{1}{|1+cd|\sqrt{1-\rho^{2}}}\phi\left(\frac{U+(1+cd)\sqrt{1-\rho^{2}}\Phi^{-1}(\tau)}{(1+cd)\sqrt{1-\rho^{2}}}\right).$

If we evaluate it at $0$,

$f_{u_{\tau}}(0|d,z)=\frac{1}{|1+cd|\sqrt{1-\rho^{2}}}\phi\left(\Phi^{-1}(\tau)\right).$

Note that this depends $d$, and then, the weights are not uniform.

Now, it is not standard to obtain the distribution of $u|d$. To exemplify
this, suppose $z=\left\\{0,1\right\\}$ is a simple binary variable with
$p=Pr(z=1)$ and independent of $(u,v)$. Then, the joint density is
$f(u,v,z)=\phi_{\rho}(u,v)p^{z}(1-p)^{1-z}$ and using the Jacobian
transformation we obtain:

$f(u,d,z)=\frac{1}{|1+bz|}\phi_{\rho}\left(u,\frac{d-az}{1+bz}\right)p^{z}(1-p)^{1-z}.$

Therefore,

$f(u,d)=\phi_{\rho}\left(u,d\right)(1-p)+\frac{1}{|1+b|}\phi_{\rho}\left(u,\frac{d-a}{1+b}\right)p,$

and

$f(d)=\phi(d)(1-p)+\frac{1}{|1+b|}\phi\left(\frac{d-a}{1+b}\right)p.$

Putting all that together, the conditional density is

$f(u|d)=\frac{\phi_{\rho}\left(u,d\right)(1-p)+\frac{1}{|1+b|}\phi_{\rho}\left(u,\frac{d-a}{1+b}\right)p}{\phi(d)(1-p)+\frac{1}{|1+b|}\phi\left(\frac{d-a}{1+b}\right)p}.$

If we assume that $p=\frac{|1+b|}{1+|1+b|}$ this expression simplifies to

$f(u|d)=\frac{\phi_{\rho}\left(u,d\right)+\phi_{\rho}\left(u,\frac{d-a}{1+b}\right)}{\phi(d)+\phi\left(\frac{d-a}{1+b}\right)}.$

We can rewrite this as a function of standard normal densities noting that
$\phi_{\rho}(u,d)=\phi_{\rho}(u|d)\phi(d)$ with
$\phi_{\rho}(u|d)=\frac{1}{\sqrt{1-\rho^{2}}}\phi\left(\frac{u-\rho
d}{\sqrt{1-\rho^{2}}}\right)$, then

$f(u|d)=\frac{1}{\sqrt{1-\rho^{2}}}\phi\left(\frac{u-\rho
d}{\sqrt{1-\rho^{2}}}\right)\omega(d)+\frac{1}{\sqrt{1-\rho^{2}}}\phi\left(\frac{u-\rho\frac{d-a}{1+b}}{\sqrt{1-\rho^{2}}}\right)(1-\omega(d)),$

where $\omega(d)=\frac{\phi(d)}{\phi(d)+\phi\left(\frac{d-a}{1+b}\right)}$.
Therefore, conditional on $d$ this density is a Gaussian mixture of two
distributions with different means. Two particular cases are: (i) $\rho=0$
(exogeneity) where $f(u|d)=\phi(u)$; (ii) $a=b=0$ ($d$ and $z$ unrelated)
which reduces to $f(u|d)=\phi_{\rho}(u|d)$. Obviously, in the rest of the
cases $Q_{\tau}(u|d)$ does not have an explicit analytical solution and
therefore neither $u^{*}_{\tau}=y-Q_{\tau}(y|d)=(1+cd)(u-Q_{\tau}(u|d))$.

The interesting feature to notice is that in all cases, the distribution of
$u^{*}_{\tau}$ depends basically on $d$, and $(1+cd)$ should be used to
standardize its density function in a similar way to $u_{\tau}$.

## References

  * Amemiya (1982) Amemiya, T. (1982).  Two stage least absolute deviations estimators.  Econometrica, 50, 689–711.
  * Andrews and Mikusheva (2016) Andrews, I. and Mikusheva, A. (2016).  Conditional inference with a functional nuisance parameter.  Econometrica, 84, 1571–1612.
  * Angrist, Chernozhukov, and Fernández-Val (2006) Angrist, J., Chernozhukov, V. and Fernández-Val, I. (2006).  Quantile regression under misspecification, with an application to the U.S. wage structure.  Econometrica, 74, 539-563.
  * Card (1995) Card, D. (1995).  Using Geographic Variation in College Proximity to Estimate the Return to Schooling.  In Aspects of Labour Market Behaviour: Essays in Honour of John Vanderkamp, ed, by Louis N. Christofides, E. Kenneth Grant, and Robert Swidinsky. Toronto: University of Toronto Press, 201-222.
  * Chen and Portnoy (1996) Chen, L-A. and Portnoy, S.  Two-stage regression quantiles and two-stage trimmed least squares estimators for structural equation models.  Communication in Statistics, Theory Methods, 25, 1005–1032.
  * Chen and Lee (2018) Chen, L-Y. and Lee, S.  Exact computation of GMM estimators for instrumental variable quantile regression models.  Journal of Applied Econometrics, 33 (4), 553–567.
  * Chernozhukov and Hansen (2004) Chernozhukov, V. and Hansen, C. (2004).  The effects of 401(k) participation on the wealth distribution: An instrumental quantile regression analysis.  Review of Economics and Statistics, 86, 735–751.
  * Chernozhukov and Hansen (2005) Chernozhukov, V. and Hansen, C. (2005).  An IV model of quantile treatment effects.  Econometrica, 73, 245–261.
  * Chernozhukov and Hansen (2006) Chernozhukov, V. and Hansen, C. (2006).  Instrumental quantile regression inference for structural and treatment effects models.  Journal of Econometrics, 132, 491–525.
  * Chernozhukov and Hansen (2008) Chernozhukov, V. and Hansen, C. (2008).  Instrumental variable quantile regression: A robust inference approach.  Journal of Econometrics, 142, 379–398.
  * Chernozhukov, Hansen and Jansson (2007) Chernozhukov, V., Hansen, C. and Jansson, M. (2007).  Inference approaches for instrumental variable quantile regression.  Economics Letters, 95, 272–277.
  * Chernozhukov, Hansen and Jansson (2009) Chernozhukov, V., Hansen, C. and Jansson, M. (2009).  Finite sample inference for quantile regression models.  Journal of Econometrics, 152, 93–103.
  * Chernozhukov, Hansen and Wüthrich (2020) Chernozhukov, V., Hansen, C. and Wüthrich, K. (2020).  Instrumental variable quantile regression.  Handbook of Quantile Regression, https://arxiv.org/abs/2009.00436
  * Chesher (2003) Chesher, A. (2003).  Identification in nonseparable models.  Econometrica, 71, 1405–1441.
  * Chetverikov, Larsen and Palmer (2016) Chetverikov, D., Larsen, B., and Palmer, C..  IV quantile regression for group-level treatments, with an application to the distributional effects of trade.  Econometrica, 84, 809–833.
  * de Castro et al. (2019) de Castro, L., Galvao, A.F., Kaplan, D.M. and Liu, X. (2019)  Smoothed GMM for quantile models.  Journal of Econometrics, 213, 121–144.
  * Dufour (1997) Dufour, J.-M. (1997)  Some impossibility theories in econometrics with applications to structural and dynamic models.  Econometrica , 65, 1365–1388.
  * Firpo et al. (2021) Firpo, S. and Galvao, A.F. and Pinto, C. and Poirier, A. and Sanroman, G. (2021)  GMM quantile regression.  Journal of Econometrics , forthcoming.
  * Galvao (2011) Galvao, A.F. (2011).  Quantile regression for dynamic panel data with fixed effects.  Journal of Econometrics, 164, 142–157.
  * Galvao and Montes-Rojas (2015) Galvao, A.F. and Montes-Rojas, G. (2015).  On the equivalence of instrumental variables estimators for linear models.  Economics Letters, 134, 13–15.
  * Hall and Sheather (1988) Hall, P. and Sheather, S.J. (1988).  On the distribution of a studentized quantile.  Journal of the Royal Statistical Society: Series B, 50 (3), 381–391.
  * Hendricks and Koenker (1992) Hendricks, W. and Koenker, R. (1992).  Hierarchical spline models for conditional quantiles and the demand for electricity.  Journal of the American Statistical Association, 87, 58–68.
  * Jun (2008) Jun, S.J. (2008).  Weak identification robust tests in an instrumental quantile model.  Journal of Econometrics, 144, 118–138.
  * Kaido and Wüthrich (2021) Kaido, H. and Wüthrich, K. (2021).  Decentralization estimators for instrumental variable quantile regression models.  Quantitative Economics, 12, 443–475.
  * Kaplan and Sun (2017) Kaplan, D.M. and Sun, Y. (2017).  Smoothed estimating equations for instrumental variables quantile regression.  Econometric Theory, 33, 105–157.
  * Kim and Muller (2004) Kim, T-H and Muller, C. (2004).  Two-stage quantile regression when the first stage is based on quantile regression.  Econometrics Journal, 7, 218–231.
  * Koenker (2005) Koenker, R. (2005).  Quantile Regression New York: Cambridge University Press.
  * Lee (2007) Lee, S. (2007).  Endogeneity in quantile regression models: A control function approach.  Journal of Econometrics, 101, 1131–1158.
  * Lee et al. (2020) Lee, D.S., McCrary, J., Moreira, M.J. and Porter, J. (2020).  Valid t-ratio inference for IV.  Draft version. https://arxiv.org/abs/2010.05058
  * Ma and Koenker (2006) Ma, L. and Koenker, R. (2006).  Quantile regression methods for recursive structural equation models.  Journal of Econometrics, 134, 471–506.
  * Ota, Kato, and Hara (2019) Ota, H., Kato, K. and Hara, S.  Quantile regression approach to conditional mode estimation.  Electronic Journal of Statistics, 13, 3120–3160.
  * Pouliot (2019) Pouliot, G.A. (2019)  Instrumental variables quantile regression with multivariate endogenous variable.  Draft version. https://bfi.uchicago.edu/wp-content/uploads/MILP_for_IVQR_V4_4.pdf
  * Powell (1983) Powell, J.L. (1983).  The asymptotic normality of two-stage least absolute deviations estimators.  Econometrica, 51, 1569–1576.
  * Powell (1991) Powell, J.L. (1991).  Estimation of monotonic regression models under quantile restrictions. In W. Barnett, J. Powell, G. Tauchen (Eds.), Nonparametric and semiparametric models in econometrics. Cambridge: Cambridge University Press.
  * Sanderson and Windmeijer (2016) Sanderson, E. and Windmeijer, F. (2016).  A weak instrument F-test in linear IV models with multiple endogenous variables.  Journal of Econometrics, 190, 212-221.
  * Staiger and Stock (1997) Staiger, D. and Stock, J.H. (1997).  Instrumental variables regression with weak instruments.  Econometrica, 65, 557-566.
  * Stock and Yogo (2005) Stock, J.H. and Yogo, M. (2005).  Testing for weak instruments in linear IV regression.  In D.W.K. Andrews (Ed.) Identification and Inference for Econometric Models, 80-108. New York: Cambridge University Press.
  * Zhou and Portnoy (1996) Zhou, K.Q. and Portnoy, S.L. (1996).  Direct use of regression quantiles to construct confidence sets in linear Models.  Annals of Statistics, 24, 287-306.