MATLAB code for quantile regression

Here are a couple MATLAB functions that perform nonlinear quantile regression.
  1. ipqr.m, which uses an interior point method of Koenker and Park (1996, J. Econometrics). This function requires a second supporting function, ipqr_objfunc.m.
  2. mmqr.m, which uses a Majorize-Minimize method of Hunter and Lange (2000, J. Comp. Graph. Statistics).
Each of these functions requires two additional supporting functions that calculate, for a given value of the parameter vector beta, the vector of regression function values and the matrix of partial derivatives of the regression function. See the comments contained in the code for further details. Below is the code for the common (very simple!) case of linear quantile regression and a nonlinear example in Section 5 of the Hunter and Lange paper, followed by code for each of the test problems in Koenker and Park's 1996 paper. Note that each of the test problems requires a response vector and (sometimes) a predictor matrix as well; these can be found by reading the 1996 paper. In order to write new objective functions, just name one of them, say, FUNC.m, which means that the other should be named dFUNC.m. The requirements of these functions are as follows: Here is a sample script for running in batch mode, which requires the Matlab routine tester.m. (Note: I had to make some small changes to these files when I posted them, and I haven't tested them with those changes. Thus, I don't guarantee them to be bug-free.)
Last modified: February 1, 2002
dhunter@stat.psu.edu