I am aware of (and have used) the rq.ivpanel package for R by Charlie Lamarche and ivqreg package for Stata by Do Wan Kwak, but those both work only for panel data.
Are these endogeneous regressors binary? Have a look in the paper "Estimation of quantile treatment effects with Stata", published in Stata Journal in 2010. Check also if the program "ivqte" would help you.
Do Wan Kwak's package is the one refered in the paper "Estimation of quantile treatment effects with Stata", Stata Journal 2010. It is a cross sectional estimator and it is quite familiar to me because I was working on this models during the last 5 years.
Kwak's package can be downloaded at Christian Hansen web page: http://faculty.chicagobooth.edu/christian.hansen/research/#IVQR
Although I programmed Chernozhukov and Hansen's estimator within Stata when I was working in my paper "Returns to foreign languages of native workers in the EU"; I used both my program and Do Wan Kwak's package for my working paper "Is There a Gender Bias in the Use of Foreign Languages in Europe? (http://ideas.repec.org/p/eca/wpaper/2013-113536.html) and it is very easy to use.
Thank you for all of the comments I have been checking out some of the different alternatives.
1. The dependent variable is not censored, so unfortunately the cqiv package won't work.
2. The dependent variable is not binary, so same for ivqte.
3. I am curious to hear more about Juan's response. My sense is that the ivqreg was more for panel data but I might be mistaken. I was somewhat able to get ivqreg to work, but only when I created a "time" variable equal to one for all observations and ran "tsset id time". Even then, it only "worked" for estimating coefficients; the variance matrix was unstable. Maybe it is a problem with my dataset or my instruments.
4. Muhammed's response is also potentially useful. It looks like Lee is using the residuals from a series of quantile regressions of X on (Z1, Z2) as an added control in the quantile regression(s) for Y on (X, Z1). I considered this intuitively before investigating the literature, but it seemed like the tricky part of this is determining which quantile of X's residuals should be used as controls in the specification of a particular quantile of Y.
5. Luca, do you happen to know of an ungated link for the reference you've cited?
I agree with your views of using the potential quarile into the regression, I am sure the given reference therein contains any intuitive answer to selection of the useful method to answer such questions.
Amir Sariaslan was right. The stata command "cqiv" has an option (uncensored) so that uncensored quantile IV (QIV) estimation for cross sectional data can be performed.
Answering my own question here, but I found a new Kaplan and Sun (2017) article in Econometric Theory that does this for quantile regression with a smoothed estimating function.
Thanks for this, James. Pretty tricky to manage the function, relative to quantreg or AER for the respective quantile and IV packages. Here's hoping someone will do for R what Frolich and Melly did for Stata!
NB: there are three different approaches to QR with endogeneity, with three different sets of assumptions. None is "better" or "worse," just appropriate for different applications. See Section 1.2.5 in https://faculty.chicagobooth.edu/christian.hansen/research/IVQRchapter-latestversion_v4.pdf for more (published version: Section 9.2.5 in Chapter 9 in the Handbook of Quantile Regression). I think in Stata, cqiv is the control function approach, ivqte is the local quantile treatment effect approach, and ivqreg is the instrumental variables approach.
In R, I have code for a particular estimator within the IV approach:
You can get other files (including the Journal of Econometrics paper, which discusses some advantages) under "Smoothed estimating equations for instrumental variables quantile regression" at