The QUANTREG Procedure

Optimization Algorithms

The optimization problem for median regression has been formulated and solved as a linear programming (LP) problem since the 1950s. Variations of the simplex algorithm, especially the method of Barrodale and Roberts (1973), have been widely used to solve this problem. The simplex algorithm is computationally demanding in large statistical applications, and in theory the number of iterations can increase exponentially with the sample size. This algorithm is often useful with data that contain no more than tens of thousands of observations.

Several alternatives have been developed to handle upper L 1 regression for larger data sets. The interior point approach of Karmarkar (1984) solves a sequence of quadratic problems in which the relevant interior of the constraint set is approximated by an ellipsoid. The worst-case performance of the interior point algorithm has been proved to be better than the worst-case performance of the simplex algorithm. More important, experience has shown that the interior point algorithm is advantageous for larger problems.

Like upper L 1 regression, general quantile regression fits nicely into the standard primal-dual formulations of linear programming.

In addition to the interior point method, various heuristic approaches are available for computing upper L 1-type solutions. Among these, the finite smoothing algorithm of Madsen and Nielsen (1993) is the most useful. It approximates the upper L 1-type objective function with a smoothing function, so that the Newton-Raphson algorithm can be used iteratively to obtain a solution after a finite number of iterations. The smoothing algorithm extends naturally to general quantile regression.

The QUANTREG procedure implements the simplex, interior point, and smoothing algorithms. The remainder of this section describes these algorithms in more detail.

Simplex Algorithm

Let bold-italic mu equals left-bracket bold y minus bold upper A prime bold-italic beta right-bracket Subscript plus, bold-italic nu equals left-bracket bold upper A prime bold-italic beta minus bold y right-bracket Subscript plus, bold-italic phi equals left-bracket bold-italic beta right-bracket Subscript plus, and bold-italic phi equals left-bracket negative bold-italic beta right-bracket Subscript plus, where bold y equals left-parenthesis y 1 comma ellipsis comma y Subscript n Baseline right-parenthesis prime is the response vector, bold upper A prime equals left-parenthesis bold x 1 comma ellipsis comma bold x Subscript n Baseline right-parenthesis prime is the left-parenthesis n times p right-parenthesis regressor matrix, and left-bracket z right-bracket Subscript plus is the nonnegative part of z.

Let upper D Subscript upper L upper A upper R Baseline left-parenthesis bold-italic beta right-parenthesis equals sigma-summation Underscript i equals 1 Overscript n Endscripts StartAbsoluteValue y Subscript i Baseline minus bold x prime Subscript i Baseline bold-italic beta EndAbsoluteValue. For the upper L 1 problem, the simplex approach solves min Underscript bold-italic beta Endscripts upper D Subscript upper L upper A upper R Baseline left-parenthesis bold-italic beta right-parenthesis by reformulating it as the constrained minimization problem

min Underscript bold-italic beta Endscripts left-brace bold e prime bold-italic mu plus bold e prime bold-italic nu vertical-bar bold y equals bold upper A prime bold-italic beta plus bold-italic mu minus bold-italic nu comma StartSet bold-italic mu comma bold-italic nu EndSet element-of bold upper R Subscript plus Superscript n Baseline right-brace

where bold e denotes an left-parenthesis n times 1 right-parenthesis vector of ones.

Let bold upper B equals left-bracket bold upper A prime minus bold upper A Superscript prime Baseline bold upper I negative bold upper I right-bracket, bold-italic theta equals left-parenthesis bold-italic phi prime bold-italic phi prime bold-italic mu prime bold-italic nu Superscript prime Baseline right-parenthesis prime, and bold d equals left-parenthesis bold 0 prime bold 0 prime bold e prime bold e Superscript prime Baseline right-parenthesis prime, where bold 0 prime equals left-parenthesis 0 0 ellipsis 0 right-parenthesis Subscript p. The reformulation presents a standard LP problem:

StartLayout 1st Row 1st Column Blank 2nd Column left-parenthesis normal upper P right-parenthesis 3rd Column min Underscript bold-italic theta Endscripts bold d prime bold-italic theta semicolon subject to bold upper B bold-italic theta equals bold y comma bold-italic theta greater-than-or-equal-to bold 0 EndLayout

This problem has the following dual formulation:

StartLayout 1st Row 1st Column Blank 2nd Column left-parenthesis normal upper D right-parenthesis 3rd Column max Underscript z Endscripts bold y prime bold z semicolon subject to bold upper B prime bold z less-than-or-equal-to bold d EndLayout

This formulation can be simplified as

max Underscript z Endscripts bold y prime bold z semicolon subject to bold upper A bold z equals bold 0 comma bold z element-of left-bracket negative 1 comma 1 right-bracket Superscript n

By setting bold-italic eta equals one-half plus one-half bold e comma bold b equals one-half bold upper A bold e, the problem becomes

max Underscript bold-italic eta Endscripts bold y prime bold-italic eta semicolon subject to bold upper A bold-italic eta equals bold b comma bold-italic eta element-of left-bracket 0 comma 1 right-bracket Superscript n

For quantile regression, the minimization problem is min Underscript bold-italic beta Endscripts sigma-summation rho Subscript tau Baseline left-parenthesis y Subscript i Baseline minus bold x prime Subscript i Baseline bold-italic beta right-parenthesis, and a similar set of steps leads to the dual formulation

max Underscript z Endscripts bold y prime bold z semicolon subject to bold upper A bold z equals left-parenthesis 1 minus tau right-parenthesis bold upper A bold e comma bold z element-of left-bracket 0 comma 1 right-bracket Superscript n

The QUANTREG procedure solves this LP problem by using the simplex algorithm of Barrodale and Roberts (1973). This algorithm exploits the special structure of the coefficient matrix bold upper B by solving the primary LP problem (P) in two stages: The first stage chooses the columns in bold upper A prime or minus bold upper A prime as pivotal columns. The second stage interchanges the columns in bold upper I or –bold upper I as basis or nonbasis columns, respectively. The algorithm obtains an optimal solution by executing these two stages interactively. Moreover, because of the special structure of bold upper B, only the main data matrix bold upper A is stored in the current memory.

Although this special version of the simplex algorithm was introduced for median regression, it extends naturally to quantile regression for any given quantile and even to the entire quantile process (Koenker and d’Orey 1994). It greatly reduces the computing time that is required by the general simplex algorithm, and it is suitable for data sets with fewer than 5,000 observations and 50 variables.

Interior Point Algorithm

The ALGORITHM=INTERIOR option implements an interior point algorithm. This algorithm uses the primal-dual predictor-corrector method that is proposed by Lustig, Marsten, and Shanno (1992). Roos, Terlaky, and Vial (1997) provide more information about this particular algorithm. The following brief introduction of this algorithm uses the notation in the first reference.

To be consistent with the conventional linear programming setting, let bold c equals negative bold y, let bold b equals left-parenthesis 1 minus tau right-parenthesis bold upper A bold e, and let u be the general upper bound. The dual form of quantile regression solves the following linear programming primal problem:

min left-brace bold c prime bold z right-brace; subject to bold upper A bold z equals bold b, bold 0 less-than-or-equal-to bold z less-than-or-equal-to bold u

This primal problem has n variables. The index i denotes a variable number, and k denotes an iteration number. If k is used as a subscript or superscript, it denotes "of iteration k."

Let bold v be the primal slack so that bold z plus bold v equals bold u. Associate dual variables w with these constraints. The interior point algorithm solves the system of equations to satisfy the Karush-Kuhn-Tucker (KKT) conditions for optimality:

StartLayout 1st Row 1st Column bold b 2nd Column equals bold upper A bold z 2nd Row 1st Column bold u 2nd Column equals bold z plus bold v 3rd Row 1st Column bold c 2nd Column equals bold upper A prime bold t plus bold s minus bold w 4th Row 1st Column bold 0 2nd Column equals bold upper Z bold upper S bold e 5th Row 1st Column bold 0 2nd Column equals bold upper V bold upper W bold e 6th Row 1st Column Blank 2nd Column bold z comma bold s comma bold v comma bold w greater-than-or-equal-to bold 0 EndLayout

where bold upper W equals normal d normal i normal a normal g left-parenthesis bold w right-parenthesis left-parenthesis that is comma upper W Subscript i comma j Baseline equals StartLayout Enlarged left-brace 1st Row 1st Column w Subscript i Baseline 2nd Column for i equals j 2nd Row 1st Column 0 2nd Column otherwise EndLayout right-parenthesis, bold upper V equals normal d normal i normal a normal g left-parenthesis bold v right-parenthesis, bold upper Z equals normal d normal i normal a normal g left-parenthesis bold z right-parenthesis, bold upper S equals normal d normal i normal a normal g left-parenthesis bold s right-parenthesis.

These are the conditions for feasibility, with the addition of complementarity conditions bold upper Z bold upper S bold e equals bold 0 and bold upper V bold upper W bold e equals bold 0. The equality bold c prime bold z equals bold b prime bold t minus bold u prime bold w must occur at the optimum. Complementarity forces the optimal objectives of the primal and dual to be equal, bold c prime bold z Subscript o p t Baseline equals bold b prime bold t Subscript o p t Baseline minus bold u prime bold w Subscript o p t, because

StartLayout 1st Row 1st Column 0 2nd Column equals bold v prime Subscript o p t Baseline bold w Subscript o p t Baseline equals left-parenthesis bold u minus bold z Subscript o p t Baseline right-parenthesis prime bold w Subscript o p t Baseline equals bold u prime bold w Subscript o p t Baseline minus bold z prime Subscript o p t Baseline bold w Subscript o p t Baseline 2nd Row 1st Column 0 2nd Column equals bold z prime Subscript o p t Baseline bold s Subscript o p t Baseline equals bold s prime Subscript o p t Baseline bold z Subscript o p t Baseline equals left-parenthesis bold c minus bold upper A prime bold t Subscript o p t Baseline plus bold w Subscript o p t Baseline right-parenthesis prime bold z Subscript o p t Baseline 3rd Row 1st Column Blank 2nd Column equals bold c prime bold z Subscript o p t Baseline minus bold t prime Subscript o p t Baseline left-parenthesis bold upper A bold z Subscript o p t Baseline right-parenthesis plus bold w prime Subscript o p t Baseline bold z Subscript o p t Baseline equals bold c prime bold z Subscript o p t Baseline minus bold b prime bold t Subscript o p t Baseline plus bold u prime bold w Subscript o p t EndLayout

Therefore

0 equals bold c prime bold z Subscript o p t Baseline minus bold b prime bold t Subscript o p t Baseline plus bold u prime bold w Subscript o p t

The duality gap, bold c prime bold z minus bold b prime bold t plus bold u prime bold w, measures the convergence of the algorithm. You can specify a tolerance for this convergence criterion in the TOLERANCE= option in the PROC QUANTREG statement.

Before the optimum is reached, it is possible for a solution left-parenthesis bold z comma bold t comma bold s comma bold v comma bold w right-parenthesis to violate the KKT conditions in one of several ways:

  • Primal bound constraints can be broken: bold-italic delta Subscript b Baseline equals bold u minus bold z minus bold v not-equals bold 0.

  • Primal constraints can be broken: bold-italic delta Subscript c Baseline equals bold b minus bold upper A bold z not-equals bold 0.

  • Dual constraints can be broken: bold-italic delta Subscript d Baseline s equals bold c minus bold upper A prime bold t minus bold s plus bold w not-equals bold 0.

  • Complementarity conditions are unsatisfied: bold z prime bold s not-equals 0 and bold v prime bold w not-equals 0.

The interior point algorithm works by using Newton’s method to find a direction left-parenthesis bold upper Delta z Superscript k Baseline comma bold upper Delta t Superscript k Baseline comma bold upper Delta s Superscript k Baseline comma bold upper Delta v Superscript k Baseline comma bold upper Delta w Superscript k Baseline right-parenthesis to move from the current solution left-parenthesis bold z Superscript k Baseline comma bold t Superscript k Baseline comma bold s Superscript k Baseline comma bold v Superscript k Baseline comma bold w Superscript k Baseline right-parenthesis toward a better solution:

left-parenthesis bold z Superscript k plus 1 Baseline comma bold t Superscript k plus 1 Baseline comma bold s Superscript k plus 1 Baseline comma bold v Superscript k plus 1 Baseline comma bold w Superscript k plus 1 Baseline right-parenthesis equals left-parenthesis bold z Superscript k Baseline comma bold t Superscript k Baseline comma bold s Superscript k Baseline comma bold v Superscript k Baseline comma bold w Superscript k Baseline right-parenthesis plus kappa left-parenthesis bold upper Delta z Superscript k Baseline comma bold upper Delta t Superscript k Baseline comma bold upper Delta s Superscript k Baseline comma bold upper Delta v Superscript k Baseline comma bold upper Delta w Superscript k Baseline right-parenthesis

kappa is the step length and is assigned a value as large as possible, but not so large that a bold z Subscript i Superscript k plus 1 or bold s Subscript i Superscript k plus 1 is "too close" to 0. You can control the step length in the KAPPA= option in the PROC QUANTREG statement.

The QUANTREG procedure implements a predictor-corrector variant of the primal-dual interior point algorithm. First, Newton’s method is used to find a direction left-parenthesis bold upper Delta z Subscript a f f Superscript k Baseline comma bold upper Delta t Subscript a f f Superscript k Baseline comma bold upper Delta s Subscript a f f Superscript k Baseline comma bold upper Delta v Subscript a f f Superscript k Baseline comma bold upper Delta w Subscript a f f Superscript k Baseline right-parenthesis in which to move. This is known as the affine step.

In iteration k, the affine step system that must be solved is

StartLayout 1st Row 1st Column bold-italic delta Subscript b Baseline equals 2nd Column bold upper Delta z Subscript a f f plus bold upper Delta v Subscript a f f 2nd Row 1st Column bold-italic delta Subscript c Baseline equals 2nd Column bold upper A bold upper Delta z Subscript a f f 3rd Row 1st Column bold-italic delta Subscript d Baseline equals 2nd Column bold upper A prime bold upper Delta t Subscript a f f Baseline plus bold upper Delta s Subscript a f f Baseline minus bold upper Delta w Subscript a f f Baseline equals bold-italic delta Subscript d Baseline 4th Row 1st Column minus bold upper Z bold upper S bold e equals 2nd Column bold upper S bold upper Delta z Subscript a f f plus bold upper Z bold upper Delta s Subscript a f f 5th Row 1st Column minus bold upper V bold upper W bold e equals 2nd Column bold upper V bold upper Delta w Subscript a f f plus bold upper W bold upper Delta z Subscript a f f EndLayout

Therefore, the following computations are involved in solving the affine step, where kappa is the step length as before:

StartLayout 1st Row 1st Column bold upper Theta 2nd Column equals bold upper S bold upper Z Superscript negative 1 Baseline plus bold upper W bold upper V Superscript negative 1 Baseline 2nd Row 1st Column bold-italic rho 2nd Column equals bold upper Theta Superscript negative 1 Baseline left-parenthesis bold-italic delta Subscript d Baseline plus left-parenthesis bold upper S minus bold upper W right-parenthesis bold e minus bold upper V Superscript negative 1 Baseline bold upper W bold-italic delta Subscript b Baseline right-parenthesis 3rd Row 1st Column bold upper Delta t Subscript a f f 2nd Column equals left-parenthesis bold upper A bold upper Theta Superscript negative 1 Baseline bold upper A prime right-parenthesis Superscript negative 1 Baseline left-parenthesis bold-italic delta Subscript c Baseline plus bold upper A bold-italic rho right-parenthesis 4th Row 1st Column bold upper Delta z Subscript a f f 2nd Column equals bold upper Theta Superscript negative 1 Baseline bold upper A prime bold upper Delta t Subscript a f f Baseline minus bold-italic rho 5th Row 1st Column bold upper Delta v Subscript a f f 2nd Column equals bold-italic delta Subscript b Baseline minus bold upper Delta z Subscript a f f Baseline 6th Row 1st Column bold upper Delta w Subscript a f f 2nd Column equals minus bold upper W bold e minus bold upper V Superscript negative 1 Baseline bold upper W bold upper Delta z Subscript a f f Baseline 7th Row 1st Column bold upper Delta s Subscript a f f 2nd Column equals minus bold upper S bold e minus bold upper Z Superscript negative 1 Baseline bold upper S bold upper Delta z Subscript a f f Baseline 8th Row 1st Column left-parenthesis bold z Subscript a f f Baseline comma bold t Subscript a f f Baseline comma bold s Subscript a f f Baseline comma bold v Subscript a f f Baseline comma bold w Subscript a f f Baseline right-parenthesis 2nd Column equals left-parenthesis bold z comma bold t comma bold s comma bold v comma bold w right-parenthesis plus kappa left-parenthesis bold upper Delta z Subscript a f f Baseline comma bold upper Delta t Subscript a f f Baseline comma bold upper Delta s Subscript a f f Baseline comma bold upper Delta v Subscript a f f Baseline comma bold upper Delta w Subscript a f f Baseline right-parenthesis EndLayout

The success of the affine step is gauged by calculating the complementarity of bold z prime bold s and bold v prime bold w at left-parenthesis bold z Subscript a f f Superscript k Baseline comma bold t Subscript a f f Superscript k Baseline comma bold s Subscript a f f Superscript k Baseline comma bold v Subscript a f f Superscript k Baseline comma bold w Subscript a f f Superscript k Baseline right-parenthesis and comparing it with the complementarity at the starting point left-parenthesis bold z Superscript k Baseline comma bold t Superscript k Baseline comma bold s Superscript k Baseline comma bold v Superscript k Baseline comma bold w Superscript k Baseline right-parenthesis. If the affine step was successful in reducing the complementarity by a substantial amount, the need for centering is not great. Therefore, a value close to 0 is assigned to sigma in the following second linear system, which is used to determine a centering vector.

The following linear system is solved to determine a centering vector left-parenthesis bold upper Delta z Subscript c Baseline comma bold upper Delta t Subscript c Baseline comma bold upper Delta s Subscript c Baseline comma bold upper Delta v Subscript c Baseline comma bold upper Delta w Subscript c Baseline right-parenthesis from left-parenthesis bold z Subscript a f f Baseline comma bold t Subscript a f f Baseline comma bold s Subscript a f f Baseline comma bold v Subscript a f f Baseline comma bold w Subscript a f f Baseline right-parenthesis:

StartLayout 1st Row 1st Column bold upper Delta z Subscript c plus bold upper Delta v Subscript c 2nd Column equals bold 0 2nd Row 1st Column bold upper A bold upper Delta z Subscript c 2nd Column equals bold 0 3rd Row 1st Column bold upper A prime bold upper Delta t Subscript c plus bold upper Delta s Subscript c minus bold upper Delta w Subscript c 2nd Column equals bold 0 4th Row 1st Column bold upper S bold upper Delta z Subscript c plus bold upper Z bold upper Delta s Subscript c 2nd Column equals minus bold upper Z Subscript a f f Baseline bold upper S Subscript a f f Baseline bold e plus sigma bold-italic mu bold e 5th Row 1st Column bold upper V bold upper Delta w Subscript c plus bold upper W bold upper Delta v Subscript c 2nd Column equals minus bold upper V Subscript a f f Baseline bold upper W Subscript a f f Baseline bold e plus sigma bold-italic mu bold e 6th Row 1st Column where zeta Subscript s t a r t Baseline equals bold z prime bold s plus bold v prime bold w comma 2nd Column complementarity at the start of the iteration 7th Row 1st Column zeta Subscript a f f Baseline equals bold z prime Subscript a f f Baseline bold s Subscript a f f Baseline plus bold v prime Subscript a f f Baseline bold w Subscript a f f Baseline comma 2nd Column the affine complementarity 8th Row 1st Column mu equals zeta Subscript a f f Baseline slash 2 n comma 2nd Column the average complementarity 9th Row 1st Column sigma equals left-parenthesis zeta Subscript a f f Baseline slash zeta Subscript s t a r t Baseline right-parenthesis cubed 2nd Column Blank EndLayout

However, if the affine step was unsuccessful, then centering is deemed beneficial, and a value close to 1.0 is assigned to sigma. In other words, the value of sigma is adaptively altered depending on the progress made toward the optimum.

Therefore, the following computations are involved in solving the centering step:

StartLayout 1st Row 1st Column bold-italic rho 2nd Column equals bold upper Theta Superscript negative 1 Baseline left-parenthesis sigma mu left-parenthesis bold upper Z Superscript negative 1 Baseline minus bold upper V Superscript negative 1 Baseline right-parenthesis bold e minus bold upper Z Superscript negative 1 Baseline bold upper Z Subscript a f f Baseline bold upper S Subscript a f f Baseline bold e plus bold upper V Superscript negative 1 Baseline bold upper V Subscript a f f Baseline bold upper W Subscript a f f Baseline bold e right-parenthesis 2nd Row 1st Column bold upper Delta t Subscript c 2nd Column equals left-parenthesis bold upper A bold upper Theta Superscript negative 1 Baseline bold upper A prime right-parenthesis Superscript negative 1 Baseline bold upper A bold-italic rho 3rd Row 1st Column bold upper Delta z Subscript c 2nd Column equals bold upper Theta Superscript negative 1 Baseline bold upper A prime bold upper Delta t Subscript c Baseline minus bold-italic rho 4th Row 1st Column bold upper Delta v Subscript c 2nd Column equals minus bold upper Delta z Subscript c Baseline 5th Row 1st Column bold upper Delta w Subscript c 2nd Column equals sigma mu bold upper V Superscript negative 1 Baseline bold e minus bold upper V Superscript negative 1 Baseline bold upper V Subscript a f f Baseline bold upper W Subscript a f f Baseline bold e minus bold upper V Superscript negative 1 Baseline bold upper W Subscript a f f Baseline bold upper Delta v Subscript c Baseline 6th Row 1st Column bold upper Delta s Subscript c 2nd Column equals sigma mu bold upper Z Superscript negative 1 Baseline bold e minus bold upper Z Superscript negative 1 Baseline bold upper Z Subscript a f f Baseline bold upper S Subscript a f f Baseline bold e minus bold upper Z Superscript negative 1 Baseline bold upper S Subscript a f f Baseline bold upper Delta z Subscript c EndLayout

Then

StartLayout 1st Row 1st Column Blank 2nd Column left-parenthesis bold upper Delta z comma bold upper Delta t comma bold upper Delta s comma bold upper Delta v comma bold upper Delta w right-parenthesis equals left-parenthesis bold upper Delta z Subscript a f f Baseline comma bold upper Delta t Subscript a f f Baseline comma bold upper Delta s Subscript a f f Baseline comma bold upper Delta v Subscript a f f Baseline comma bold upper Delta w Subscript a f f Baseline right-parenthesis plus left-parenthesis bold upper Delta z Subscript c Baseline comma bold upper Delta t Subscript c Baseline comma bold upper Delta s Subscript c Baseline comma bold upper Delta v Subscript c Baseline comma bold upper Delta w Subscript c Baseline right-parenthesis 2nd Row 1st Column Blank 2nd Column left-parenthesis bold z Superscript k plus 1 Baseline comma bold t Superscript k plus 1 Baseline comma bold s Superscript k plus 1 Baseline comma bold v Superscript k plus 1 Baseline comma bold w Superscript k plus 1 Baseline right-parenthesis equals left-parenthesis bold z Superscript k Baseline comma bold t Superscript k Baseline comma bold s Superscript k Baseline comma bold v Superscript k Baseline comma bold w Superscript k Baseline right-parenthesis plus kappa left-parenthesis bold upper Delta z comma bold upper Delta t comma bold upper Delta s comma bold upper Delta v comma bold upper Delta w right-parenthesis EndLayout

where, as before, kappa is the step length, which is assigned a value as large as possible but not so large that a bold z Subscript i Superscript k plus 1, bold s Subscript i Superscript k plus 1, bold v Subscript i Superscript k plus 1, or bold w Subscript i Superscript k plus 1 is "too close" to 0.

Although the predictor-corrector variant entails solving two linear systems instead of one, fewer iterations are usually required to reach the optimum. The additional overhead of the second linear system is small because the matrix left-parenthesis bold upper A bold upper Theta Superscript negative 1 Baseline bold upper A prime right-parenthesis has already been factorized in order to solve the first linear system.

You can specify the starting point in the INEST= option in the PROC QUANTREG statement. By default, the starting point is set to be the least squares estimate.

Efficient Interior Point Algorithm

The ALGORITHM=IPM option implements a more efficient interior point algorithm than the one that is used when ALGORITHM=INTERIOR. The computing strategy of the ALGORITHM=IPM option is the same as the strategy for the ALGORITHM=INTERIOR option, but the ALGORITHM=IPM option implements the algorithm by using more efficient matrix functions. The ALGORITHM=IPM option uses the complementarity value to measure the convergence of the algorithm, which is different from the dual gap value that is used when ALGORITHM=INTERIOR. The complementarity value is defined as left-parenthesis bold z prime bold s plus bold v prime bold w right-parenthesis. You can specify a tolerance for this complementarity convergence criterion by using the TOLERANCE= option in the PROC QUANTREG statement. Unlike the ALGORITHM=INTERIOR option, the ALGORITHM=IPM option does not support the KAPPA= option.

Smoothing Algorithm

To minimize the sum of the absolute residuals upper D Subscript upper L upper A upper R Baseline left-parenthesis bold-italic beta right-parenthesis, the smoothing algorithm approximates the nondifferentiable function upper D Subscript upper L upper A upper R by the following smooth function(which is referred to as the Huber function),

upper D Subscript gamma Baseline left-parenthesis bold-italic beta right-parenthesis equals sigma-summation Underscript i equals 1 Overscript n Endscripts upper H Subscript gamma Baseline left-parenthesis r Subscript i Baseline left-parenthesis bold-italic beta right-parenthesis right-parenthesis

where

upper H Subscript gamma Baseline left-parenthesis t right-parenthesis equals StartLayout Enlarged left-brace 1st Row 1st Column t squared slash left-parenthesis 2 gamma right-parenthesis 2nd Column if StartAbsoluteValue t EndAbsoluteValue less-than-or-equal-to gamma 2nd Row 1st Column StartAbsoluteValue t EndAbsoluteValue minus gamma slash 2 2nd Column if StartAbsoluteValue t EndAbsoluteValue greater-than gamma EndLayout

Here r Subscript i Baseline left-parenthesis bold-italic beta right-parenthesis equals y Subscript i Baseline minus bold x prime Subscript i Baseline bold-italic beta, and the threshold gamma is a positive real number. The function upper D Subscript gamma is continuously differentiable, and a minimizer beta Subscript gamma of upper D Subscript gamma is close to a minimizer ModifyingAbove bold-italic beta With caret Subscript upper L upper A upper R of upper D Subscript upper L upper A upper R Baseline left-parenthesis bold-italic beta right-parenthesis when gamma is close to 0.

The advantage of the smoothing algorithm as described in Madsen and Nielsen (1993) is that the upper L 1 solution ModifyingAbove bold-italic beta With caret Subscript upper L upper A upper R can be detected when gamma greater-than 0 is small. In other words, it is not necessary to let gamma converge to 0 in order to find a minimizer of upper D Subscript upper L upper A upper R Baseline left-parenthesis bold-italic beta right-parenthesis. The algorithm terminates before going through the entire sequence of values of gamma that are generated by the algorithm. Convergence is indicated by no change of the status of residuals r Subscript i Baseline left-parenthesis bold-italic beta right-parenthesis as gamma goes through this sequence.

The smoothing algorithm extends naturally from upper L 1 regression to general quantile regression (Chen 2007). The function

upper D Subscript rho Sub Subscript tau Baseline left-parenthesis bold-italic beta right-parenthesis equals sigma-summation Underscript i equals 1 Overscript n Endscripts rho Subscript tau Baseline left-parenthesis y Subscript i Baseline minus bold x prime Subscript i Baseline bold-italic beta right-parenthesis

can be approximated by the smooth function

upper D Subscript gamma comma tau Baseline left-parenthesis bold-italic beta right-parenthesis equals sigma-summation Underscript i equals 1 Overscript n Endscripts upper H Subscript gamma comma tau Baseline left-parenthesis r Subscript i Baseline left-parenthesis bold-italic beta right-parenthesis right-parenthesis

where

upper H Subscript gamma comma tau Baseline left-parenthesis t right-parenthesis equals StartLayout Enlarged left-brace 1st Row 1st Column t left-parenthesis tau minus 1 right-parenthesis minus one-half left-parenthesis tau minus 1 right-parenthesis squared gamma 2nd Column if t less-than-or-equal-to left-parenthesis tau minus 1 right-parenthesis gamma 2nd Row 1st Column StartFraction t squared Over 2 gamma EndFraction 2nd Column if left-parenthesis tau minus 1 right-parenthesis gamma less-than-or-equal-to t less-than-or-equal-to tau gamma 3rd Row 1st Column t tau minus one-half tau squared gamma 2nd Column if t greater-than-or-equal-to tau gamma EndLayout

The function upper H Subscript gamma comma tau is determined by whether r Subscript i Baseline left-parenthesis bold-italic beta right-parenthesis less-than-or-equal-to left-parenthesis tau minus 1 right-parenthesis gamma, r Subscript i Baseline left-parenthesis bold-italic beta right-parenthesis greater-than-or-equal-to tau gamma, or left-parenthesis tau minus 1 right-parenthesis gamma less-than-or-equal-to r Subscript i Baseline left-parenthesis bold-italic beta right-parenthesis less-than-or-equal-to tau gamma. These inequalities divide bold upper R Superscript p into subregions that are separated by the parallel hyperplanes r Subscript i Baseline left-parenthesis bold-italic beta right-parenthesis equals left-parenthesis tau minus 1 right-parenthesis gamma and r Subscript i Baseline left-parenthesis bold-italic beta right-parenthesis equals tau gamma. The set of all such hyperplanes is denoted by upper B Subscript gamma comma tau:

upper B Subscript gamma comma tau Baseline equals StartSet bold-italic beta element-of bold upper R Superscript p Baseline vertical-bar there-exists i colon r Subscript i Baseline left-parenthesis bold-italic beta right-parenthesis equals left-parenthesis tau minus 1 right-parenthesis gamma or r Subscript i Baseline left-parenthesis bold-italic beta right-parenthesis equals tau gamma EndSet

Define the sign vector bold s Subscript gamma Baseline left-parenthesis bold-italic beta right-parenthesis equals left-parenthesis s 1 left-parenthesis bold-italic beta right-parenthesis comma ellipsis comma s Subscript n Baseline left-parenthesis bold-italic beta right-parenthesis right-parenthesis prime as

s Subscript i Baseline equals s Subscript i Baseline left-parenthesis bold-italic beta right-parenthesis equals StartLayout Enlarged left-brace 1st Row 1st Column negative 1 2nd Column if r Subscript i Baseline left-parenthesis bold-italic beta right-parenthesis less-than-or-equal-to left-parenthesis tau minus 1 right-parenthesis gamma 2nd Row 1st Column 0 2nd Column if left-parenthesis tau minus 1 right-parenthesis gamma less-than-or-equal-to r Subscript i Baseline left-parenthesis bold-italic beta right-parenthesis less-than-or-equal-to tau gamma 3rd Row 1st Column 1 2nd Column if r Subscript i Baseline left-parenthesis bold-italic beta right-parenthesis greater-than-or-equal-to tau gamma EndLayout

and introduce

w Subscript i Baseline equals w Subscript i Baseline left-parenthesis bold-italic beta right-parenthesis equals 1 minus s Subscript i Superscript 2 Baseline left-parenthesis bold-italic beta right-parenthesis

Therefore,

StartLayout 1st Row 1st Column Blank 2nd Column Blank 3rd Column upper H Subscript gamma comma tau Baseline left-parenthesis r Subscript i Baseline left-parenthesis bold-italic beta right-parenthesis right-parenthesis equals StartFraction 1 Over 2 gamma EndFraction w Subscript i Baseline r Subscript i Superscript 2 Baseline left-parenthesis bold-italic beta right-parenthesis 2nd Row 1st Column Blank 2nd Column Blank 3rd Column plus s Subscript i Baseline left-bracket one-half r Subscript i Baseline left-parenthesis bold-italic beta right-parenthesis plus one-fourth left-parenthesis 1 minus 2 tau right-parenthesis gamma plus s Subscript i Baseline left-parenthesis r Subscript i Baseline left-parenthesis bold-italic beta right-parenthesis left-parenthesis tau minus one-half right-parenthesis minus one-fourth left-parenthesis 1 minus 2 tau plus 2 tau squared right-parenthesis gamma right-parenthesis right-bracket EndLayout

This equation yields

upper D Subscript gamma comma tau Baseline left-parenthesis bold-italic beta right-parenthesis equals StartFraction 1 Over 2 gamma EndFraction bold r prime bold upper W Subscript gamma comma tau Baseline bold r plus bold v prime left-parenthesis s right-parenthesis bold r plus c left-parenthesis s right-parenthesis

where bold upper W Subscript gamma comma tau is the diagonal n times n matrix with diagonal elements w Subscript i Baseline left-parenthesis bold-italic beta right-parenthesis, bold v prime left-parenthesis s right-parenthesis equals left-parenthesis s 1 left-parenthesis left-parenthesis 2 tau minus 1 right-parenthesis s 1 plus 1 right-parenthesis slash 2 comma ellipsis comma s Subscript n Baseline left-parenthesis left-parenthesis 2 tau minus 1 right-parenthesis s Subscript n Baseline plus 1 right-parenthesis slash 2 right-parenthesis, c left-parenthesis s right-parenthesis equals sigma-summation left-bracket one-fourth left-parenthesis 1 minus 2 tau right-parenthesis gamma s Subscript i Baseline minus one-fourth s Subscript i Superscript 2 Baseline left-parenthesis 1 minus 2 tau plus 2 tau squared right-parenthesis gamma right-bracket, and r left-parenthesis bold-italic beta right-parenthesis equals left-parenthesis r 1 left-parenthesis bold-italic beta right-parenthesis comma ellipsis comma r Subscript n Baseline left-parenthesis bold-italic beta right-parenthesis right-parenthesis prime.

The gradient of upper D Subscript gamma comma tau is given by

upper D Subscript gamma comma tau Superscript left-parenthesis 1 right-parenthesis Baseline left-parenthesis bold-italic beta right-parenthesis equals minus bold upper A left-bracket StartFraction 1 Over gamma EndFraction bold upper W Subscript gamma comma tau Baseline left-parenthesis bold-italic beta right-parenthesis r left-parenthesis bold-italic beta right-parenthesis plus v left-parenthesis s right-parenthesis right-bracket

For bold-italic beta element-of bold upper R Superscript p minus upper B Subscript gamma comma tau the Hessian exists and is given by

upper D Subscript gamma comma tau Superscript left-parenthesis 2 right-parenthesis Baseline left-parenthesis bold-italic beta right-parenthesis equals StartFraction 1 Over gamma EndFraction bold upper A bold upper W Subscript gamma comma tau Baseline left-parenthesis bold-italic beta right-parenthesis bold upper A prime

The gradient is a continuous function in bold upper R Superscript p, whereas the Hessian is piecewise constant.

Following Madsen and Nielsen (1993), the vector bold s is referred to as a gamma-feasible sign vector if there exists bold-italic beta element-of bold upper R Superscript p minus upper B Subscript gamma comma tau with bold s Subscript gamma Baseline left-parenthesis bold-italic beta right-parenthesis equals bold s. If bold s is gamma-feasible, then upper Q Subscript s is defined as the quadratic function upper Q Subscript s Baseline left-parenthesis bold-italic alpha right-parenthesis that is derived from upper D Subscript gamma comma tau Baseline left-parenthesis bold-italic beta right-parenthesis by substituting bold s for bold s Subscript gamma. Thus, for any bold-italic beta with bold s Subscript gamma Baseline equals bold s,

upper Q Subscript s Baseline left-parenthesis bold-italic alpha right-parenthesis equals one-half left-parenthesis bold-italic alpha minus bold-italic beta right-parenthesis prime upper D Subscript gamma comma tau Superscript left-parenthesis 2 right-parenthesis Baseline left-parenthesis bold-italic beta right-parenthesis left-parenthesis bold-italic alpha minus bold-italic beta right-parenthesis plus upper D Subscript gamma comma tau Superscript left-parenthesis 1 right-parenthesis Baseline left-parenthesis bold-italic beta right-parenthesis left-parenthesis bold-italic alpha minus bold-italic beta right-parenthesis plus upper D Subscript gamma comma tau Baseline left-parenthesis bold-italic beta right-parenthesis

In the domain upper C Subscript s Baseline equals StartSet alpha vertical-bar bold s Subscript gamma Baseline left-parenthesis alpha right-parenthesis equals bold s EndSet,

upper D Subscript gamma comma tau Baseline left-parenthesis alpha right-parenthesis equals upper Q Subscript s Baseline left-parenthesis bold-italic alpha right-parenthesis

For each gamma greater-than 0 and theta element-of bold upper R Superscript p, there can be one or several corresponding quadratics, upper Q Subscript s. If theta not-an-element-of upper B Subscript gamma comma tau, then upper Q Subscript s is characterized by theta and gamma. However, for theta element-of upper B Subscript gamma comma tau, the quadratic is not unique. Therefore, the following reference determines the quadratic:

left-parenthesis gamma comma theta comma bold s right-parenthesis

Again following Madsen and Nielsen (1993), let left-parenthesis gamma comma theta comma bold s right-parenthesis be a feasible reference if bold s is a gamma-feasible sign vector, where theta element-of upper C Subscript s, and let left-parenthesis gamma comma theta comma bold s right-parenthesis be a solution reference if bold s is feasible and theta minimizes upper D Subscript gamma comma tau.

The smoothing algorithm for minimizing upper D Subscript rho Sub Subscript tau is based on minimizing upper D Subscript gamma comma tau for a set of decreasing gamma. For each new value of gamma, information from the previous solution is used. Finally, when gamma is small enough, a solution can be found by the following modified Newton-Raphson algorithm as stated by Madsen and Nielsen (1993):

  1. Find an initial solution reference left-parenthesis gamma comma bold-italic beta Subscript gamma Baseline comma bold s right-parenthesis.

  2. Repeat the following substeps until gamma equals 0.

    1. Decrease gamma.

    2. Find a solution reference left-parenthesis gamma comma bold-italic beta Subscript gamma Baseline comma bold s right-parenthesis.

    bold-italic beta 0 is the solution.

By default, the initial solution reference is found by letting bold-italic beta Subscript gamma be the least squares solution. Alternatively, you can specify the initial solution reference with the INEST= option in the PROC QUANTREG statement. Then gamma and bold s are chosen according to these initial values.

There are several approaches for determining a decreasing sequence of values of gamma. The QUANTREG procedure uses a strategy by Madsen and Nielsen (1993). The computation that is uses is not significant compared to the Newton-Raphson step. You can control the ratio of consecutive decreasing values of gamma by specifying the RRATIO= suboption in the ALGORITHM= option in the PROC QUANTREG statement. By default,

RRATIO equals StartLayout Enlarged left-brace 1st Row 1st Column 0.1 2nd Column if n greater-than-or-equal-to 10,000 and p less-than-or-equal-to 20 2nd Row 1st Column 0.9 2nd Column if StartFraction p Over n EndFraction greater-than-or-equal-to 0.1 or StartSet n less-than-or-equal-to 5,000 and p greater-than-or-equal-to 300 EndSet 3rd Row 1st Column 0.5 2nd Column otherwise EndLayout

For the upper L 1 and quantile regression, it turns out that the smoothing algorithm is very efficient and competitive, especially for a fat data set—namely, when StartFraction p Over n EndFraction greater-than 0.05 and bold upper A bold upper A prime is dense. See Chen (2007) for a complete smoothing algorithm and details.

Fast Quantile Process Regression

The QUANTILE=FQPR option in the MODEL statement implements a fast quantile process regression (FQPR) method. This method can efficiently fit multiple quantile regression models by using the divide-and-conquer strategy proposed by Yao (2017).

The FQPR method begins by fitting a quantile regression model for a selected quantile level in a specified quantile-level grid of q-nodes . The quantile level, tau, is selected as the closest to 0.5 among all the quantile levels in the grid. Using this fit, FQPR defines two subsets of the data based on whether observed values y are above or below their linear predictors bold x prime bold-italic beta left-parenthesis tau right-parenthesis in this regression fit. Then FQPR proceeds to recursively perform separate quantile process regressions on the two subsets.

The successive quantile regression steps of FQPR are thus fit to smaller and smaller data sets. It is this sequence of reductions in problem size that provides the very significant reduction in computational cost that FQPR can achieve. In particular, FQPR can fit a quantile process regression model for q equally spaced quantiles in the time that it would approximately take to fit just log left-parenthesis q right-parenthesis quantile regression models to all the data.

By default, the QUANTILE=FQPR option uses the ALGORITHM=IPM option in the PROC QUANTREG statement to specify the efficient interior point algorithm for fitting the single-level models in the quantile process model. For more information about the ALGORITHM=IPM option, see the section Efficient Interior Point Algorithm. You can also use the ALGORITHM=SMOOTH option in the PROC QUANTREG statement to specify a fast smoothing algorithm for fitting the single-level models in the quantile process model. The fast smoothing algorithm uses a smooth function different from the smoothing algorithm that is described in the section Smoothing Algorithm. The fast algorithm smooth function is defined as

upper D Subscript gamma comma tau Baseline left-parenthesis bold-italic beta right-parenthesis equals sigma-summation Underscript i equals 1 Overscript n Endscripts upper H Subscript gamma comma tau Baseline left-parenthesis r Subscript i Baseline left-parenthesis bold-italic beta right-parenthesis right-parenthesis

where

upper H Subscript gamma comma tau Baseline left-parenthesis t right-parenthesis equals StartLayout Enlarged left-brace 1st Row 1st Column t left-parenthesis tau minus 1 right-parenthesis 2nd Column if t less-than-or-equal-to negative gamma 2nd Row 1st Column t left-parenthesis tau minus 0.5 right-parenthesis plus StartFraction t squared Over 4 gamma EndFraction plus StartFraction gamma Over 4 EndFraction 2nd Column if negative gamma less-than-or-equal-to t less-than-or-equal-to gamma 3rd Row 1st Column t tau 2nd Column if t greater-than-or-equal-to gamma EndLayout

The QUANTILE=FQPR(USEALLOBS) option requests that the FQPR algorithm use all the observations for fitting each of the single-level models in the quantile process model. Because of possible crossing, the USEALLOBS suboption can output a quantile-process model slightly different from the fitted FQPR model that does not use the USEALLOBS suboption.

Last updated: December 09, 2022