# Control Variate Estimator for Quantile Regression

I want to understand how a control variate estimator for quantile regression is computed. Therefore I read Ma and Koenker (2006). I'am unsure if I understood every step to achieve the CV (control variate) estimator : $$\hat{\alpha}\left(\tau_{1}, \tau_{2}\right)=\underset{a \in \mathcal{A}}{\operatorname{argmin}} \sum_{i=1}^{n} \sigma_{i 1} \rho_{\tau_{1}}\left(Y_{i 1}-g_{1}\left(Y_{i 2}, x_{i}, \hat{\nu}_{i 2}\left(\tau_{2}\right) ; a\right)\right)$$

I will try to resumeé what I think is the right way.

Let the following two models exactly identified triangluar models : $$\begin{array} YY_{i 1}=Y_{i 2} \alpha_{1}+x_{i}^{\top} \alpha_{2}+\nu_{i 1}+\lambda \nu_{i 2} \\ Y_{i 2}=z_{i} \beta_{1}+x_{i}^{\top} \beta_{2}+\nu_{i 2} \end{array}$$ Suppose that the unobserved errors $$\nu_{i 1}$$ and $$\nu_{i 2}$$ are stochastically independent and identically distributed with $$\nu_{i 1} \sim F_{1}$$ and $$\nu_{i 2} \sim F_{2} .$$ Assume further that the $$\nu_{i j}$$ 's are independent of $$\left(z_{i}, x_{i}^{\top}\right)^{\top},$$ and that for convenience $$Y_{i 2}$$ and $$z_{i}$$ are scalars.

First one needs to estimate : $$\nu_{2}\left(\tau_{2}\right)=\nu_{2}-F_{2}^{-1}\left(\tau_{2}\right)$$ Let $$\begin{array}{c} Q_{1}\left(\tau_{1} \mid Y_{i 2}, x_{i}, \nu_{i 2}\left(\tau_{2}\right)\right)=g_{1}\left(Y_{i 2}, x_{i}, \nu_{i 2}\left(\tau_{2}\right) ; \alpha\left(\tau_{1}, \tau_{2}\right)\right) \\ Q_{2}\left(\tau_{2} \mid z_{i}, x_{i}\right)=g_{2}\left(z_{i}, x_{i} ; \beta\left(\tau_{2}\right)\right) \end{array}$$ be the conditional quantile function, where $$z_i$$ is the instrument and $$x_i$$ some controls and $$Q_1(...)$$ is conditioned on the control variate $$\nu_{2}\left(\tau_{2}\right)$$.

So my first thought would be: Do a quantile regression to get an estimate of $$Q_2$$, formally expressed as $$\tilde{Q_2}(...)$$, and afterwards substract the estimated values from $$Y_2$$ for each $$\tau$$. Which would yield to $$\hat{\nu}_{i 2}\left(\tau_{2}\right)=\tilde{\varphi}_{2}\left(Y_{i 2}, z_{i}, x_{i} ; \hat{\beta}\right)-\tilde{\varphi}_{2}\left(g_{2}\left(z_{i}, x_{i} ; \hat{\beta}\right), z_{i}, x_{i} ; \hat{\beta}\right)$$ under the assumption that the model ist excatly identified.

Assuming my previous explanations are correct, Ma and Koenker come up with the follwing last two steps :

First : Estimate the parameters of the first structural equation $$g_{1}\left(Y_{i 2}, x_{i}, \hat{\nu}_{i 2}\left(\tau_{2}\right) ; a\right)=\varphi_{1}\left(Y_{i 2}, x_{i}, F_{1}^{-1}\left(\tau_{1}\right), \hat{\nu}_{i 2}\left(\tau_{2}\right) ; \alpha\right)$$

Which in my understanding can be explained as: Augment the model of $$Y_1$$ with the estimated control variate $$\hat{\nu}_{i 2}\left(\tau_{2}\right)$$ and do a quantile regression, pick up the residuals which yield to $$F_{1}^{-1}\left(\tau_{1}\right)$$ right?

In the last step the authors simply state that one has to add $$F_{1}^{-1}\left(\tau_{1}\right)$$ to the parameter vector $$a$$ (first equation) and then solve this equation. Can someone help me to explain how I do the last step given everything else is correctly explained?

Please comment, if you feel there is any misunderstanding or ambigious content, which needs clarification!

EDIT : Ma and Koenker provide some R-Code as a working example. Maybe someone is more able to help with this information. Structural Quantile Regression