Least absolute deviations explained

Least absolute deviations (LAD), also known as least absolute errors (LAE), least absolute residuals (LAR), or least absolute values (LAV), is a statistical optimality criterion and a statistical optimization technique based on minimizing the sum of absolute deviations (also sum of absolute residuals or sum of absolute errors) or the L1 norm of such values. It is analogous to the least squares technique, except that it is based on absolute values instead of squared values. It attempts to find a function which closely approximates a set of data by minimizing residuals between points generated by the function and corresponding data points. The LAD estimate also arises as the maximum likelihood estimate if the errors have a Laplace distribution. It was introduced in 1757 by Roger Joseph Boscovich.[1]

Formulation

Suppose that the data set consists of the points (xi, yi) with i = 1, 2, ..., n. We want to find a function f such that

f(xi)yi.

To attain this goal, we suppose that the function f is of a particular form containing some parameters that need to be determined. For instance, the simplest form would be linear: f(x) = bx + c, where b and c are parameters whose values are not known but which we would like to estimate. Less simply, suppose that f(x) is quadratic, meaning that f(x) = ax2 + bx + c, where a, b and c are not yet known. (More generally, there could be not just one explanator x, but rather multiple explanators, all appearing as arguments of the function f.)

We now seek estimated values of the unknown parameters that minimize the sum of the absolute values of the residuals:

S=

n
\sum
i=1

|yi-f(xi)|.

Solution

Though the idea of least absolute deviations regression is just as straightforward as that of least squares regression, the least absolute deviations line is not as simple to compute efficiently. Unlike least squares regression, least absolute deviations regression does not have an analytical solving method. Therefore, an iterative approach is required. The following is an enumeration of some least absolute deviations solving methods.

Simplex-based methods are the “preferred” way to solve the least absolute deviations problem.[7] A Simplex method is a method for solving a problem in linear programming. The most popular algorithm is the Barrodale-Roberts modified Simplex algorithm. The algorithms for IRLS, Wesolowsky's Method, and Li's Method can be found in Appendix A of [7] among other methods. Checking all combinations of lines traversing any two (x,y) data points is another method of finding the least absolute deviations line. Since it is known that at least one least absolute deviations line traverses at least two data points, this method will find a line by comparing the SAE (Smallest Absolute Error over data points) of each line, and choosing the line with the smallest SAE. In addition, if multiple lines have the same, smallest SAE, then the lines outline the region of multiple solutions. Though simple, this final method is inefficient for large sets of data.

Solution using linear programming

The problem can be solved using any linear programming technique on the following problem specification. We wish to

Minimize

n
\sum
i=1

|yi-a0-a1xi1-a2xi2--akxik|

with respect to the choice of the values of the parameters

a0,\ldots,ak

, where yi is the value of the ith observation of the dependent variable, and xij is the value of the ith observation of the jth independent variable (j = 1,...,k). We rewrite this problem in terms of artificial variables ui as

Minimize

n
\sum
i=1

ui

with respect to

a0,\ldots,ak

and

u1,\ldots,un

subject to

ui\geyi-a0-a1xi1-a2xi2--akxik     fori=1,\ldots,n

ui\ge-[yi-a0-a1xi1-a2xi2--akxik]  fori=1,\ldots,n.

These constraints have the effect of forcing each

ui

to equal

|yi-a0-a1xi1-a2xi2--akxik|

upon being minimized, so the objective function is equivalent to the original objective function. Since this version of the problem statement does not contain the absolute value operator, it is in a format that can be solved with any linear programming package.

Properties

There exist other unique properties of the least absolute deviations line. In the case of a set of (x,y) data, the least absolute deviations line will always pass through at least two of the data points, unless there are multiple solutions. If multiple solutions exist, then the region of valid least absolute deviations solutions will be bounded by at least two lines, each of which passes through at least two data points. More generally, if there are k regressors (including the constant), then at least one optimal regression surface will pass through k of the data points.[8]

This "latching" of the line to the data points can help to understand the "instability" property: if the line always latches to at least two points, then the line will jump between different sets of points as the data points are altered. The "latching" also helps to understand the "robustness" property: if there exists an outlier, and a least absolute deviations line must latch onto two data points, the outlier will most likely not be one of those two points because that will not minimize the sum of absolute deviations in most cases.

One known case in which multiple solutions exist is a set of points symmetric about a horizontal line, as shown in Figure A below.

To understand why there are multiple solutions in the case shown in Figure A, consider the pink line in the green region. Its sum of absolute errors is some value S. If one were to tilt the line upward slightly, while still keeping it within the green region, the sum of errors would still be S. It would not change because the distance from each point to the line grows on one side of the line, while the distance to each point on the opposite side of the line diminishes by exactly the same amount. Thus the sum of absolute errors remains the same. Also, since one can tilt the line in infinitely small increments, this also shows that if there is more than one solution, there are infinitely many solutions.

Advantages and disadvantages

The following is a table contrasting some properties of the method of least absolute deviations with those of the method of least squares (for non-singular problems).[9] [10]

Ordinary least squares regression Least absolute deviations regression
Not very robustRobust
Stable solutionUnstable solution
One solution*Possibly multiple solutions
*Provided that the number of data points is greater than or equal to the number of features.

The method of least absolute deviations finds applications in many areas, due to its robustness compared to the least squares method. Least absolute deviations is robust in that it is resistant to outliers in the data. LAD gives equal emphasis to all observations, in contrast to ordinary least squares (OLS) which, by squaring the residuals, gives more weight to large residuals, that is, outliers in which predicted values are far from actual observations. This may be helpful in studies where outliers do not need to be given greater weight than other observations. If it is important to give greater weight to outliers, the method of least squares is a better choice.

Variations, extensions, specializations

If in the sum of the absolute values of the residuals one generalises the absolute value function to a tilted absolute value function, which on the left half-line has slope

\tau-1

and on the right half-line has slope

\tau

, where

0<\tau<1

, one obtains quantile regression. The case of

\tau=1/2

gives the standard regression by least absolute deviations and is also known as median regression.

The least absolute deviation problem may be extended to include multiple explanators, constraints and regularization, e.g., a linear model with linear constraints:[11]

minimize

S(\beta,b)=\sumi|x'i\beta+b-yi|

subject to, e.g.,

x'1\beta+b-y1\leqk

where

\beta

is a column vector of coefficients to be estimated, b is an intercept to be estimated, xi is a column vector of the ith observations on the various explanators, yi is the ith observation on the dependent variable, and k is a known constant.

Regularization with LASSO (least absolute shrinkage and selection operator) may also be combined with LAD.[12]

See also

Further reading

Notes and References

  1. Book: Least Absolute Deviation Regression. The Concise Encyclopedia of Statistics. limited. 299–302. 10.1007/978-0-387-32833-1_225. Springer. 2008 . 9780387328331.
  2. I. . Barrodale . F. D. K. . Roberts . An improved algorithm for discrete L1 linear approximation . . 10 . 1973 . 839–848 . 2156318 . 10.1137/0710069 . 5. 1973SJNA...10..839B . 1828/11491 . free .
  3. E. J. . Schlossmacher . An Iterative Technique for Absolute Deviations Curve Fitting . . 68 . 344 . December 1973 . 857–859 . 2284512 . 10.2307/2284512 .
  4. G. O. . Wesolowsky . 1981 . A new descent algorithm for the least absolute value regression problem . Communications in Statistics – Simulation and Computation . B10 . 5 . 479–491 . 10.1080/03610918108812224.
  5. Yinbo . Li . Gonzalo R. . Arce . A Maximum Likelihood Approach to Least Absolute Deviation Regression . . 2004 . 2004 . 12 . 1762–1769 . 10.1155/S1110865704401139 . 2004EJASP2004...61L . free .
  6. Ana Sović. Kržić . Damir . Seršić . L1 minimization using recursive reduction of dimensionality . Signal Processing . 151 . 2018 . 119–129 . 10.1016/j.sigpro.2018.05.002 .
  7. William A. Pfeil,Statistical Teaching Aids, Bachelor of Science thesis, Worcester Polytechnic Institute, 2006
  8. Branham, R. L., Jr., "Alternatives to least squares", Astronomical Journal 87, June 1982, 928–937. http://adsabs.harvard.edu/full/1982AJ.....87..928B at SAO/NASA Astrophysics Data System (ADS)
  9. For a set of applets that demonstrate these differences, see the following site: http://www.math.wpi.edu/Course_Materials/SAS/lablets/7.3/73_choices.html
  10. For a discussion of LAD versus OLS, see these academic papers and reports: http://www.econ.uiuc.edu/~roger/research/rq/QRJEP.pdf and https://www.leeds.ac.uk/educol/documents/00003759.htm
  11. Mingren. Shi . Mark A. . Lukas . March 2002 . An L1 estimation algorithm with degeneracy and linear constraints . . 10.1016/S0167-9473(01)00049-4 . 39 . 1 . 35–55.
  12. Li . Wang . Michael D. . Gordon . Ji. Zhu . Regularized Least Absolute Deviations Regression and an Efficient Algorithm for Parameter Tuning . Proceedings of the Sixth International Conference on Data Mining . December 2006 . 690–700 . 10.1109/ICDM.2006.134.