Minimum Absolute Residual (L1) Regression

DESCRIPTION:
Performs an L1 regression on a matrix of explanatory variables and a vector of responses.

USAGE:
l1fit(x, y, intercept=T, print=T)

REQUIRED ARGUMENTS:
x:
vector or matrix of explanatory variables. Each row corresponds to an observation and each column to a variable. This should not contain a column of 1's unless the argument intercept is FALSE. The number of rows of x should equal the number of data values in y, and there should be fewer columns than rows. Missing values are not allowed.
y:
numeric vector containing the response. Missing values are not allowed.

OPTIONAL ARGUMENTS:
intercept:
logical flag: if TRUE, an intercept term is included in the regression model.
print:
logical flag: if TRUE, then warnings about non-unique solutions and rank deficiency are given.

VALUE:
list defining the regression (compare function lsfit).
coefficients:
vector of coefficients. If intercept is TRUE, the initial element is the term for the intercept.
residuals:
residuals from the fit.
message:
vector of one or two character strings stating whether a non-unique solution is possible, or if the x matrix (plus the intercept) was found to be rank deficient. This component is present only if one of these conditions exists.

SIDE EFFECTS:
A warning (Non-unique solution possible) is issued if a certain condition is detected. This can either mean that there is a non-unique solution, or that there is a degenerate solution (more than one parameter vector gives the same residuals), or both. Degeneracy is generally the result of rounding the response values.

DETAILS:
The Barrodale-Roberts algorithm, which is a specialized linear programming algorithm, is used. Results are currently computed to single-precision accuracy only.

BACKGROUND:
The L1 or Least Absolute Deviations technique has a long history (it was proposed prior to least squares) but due to the computational complexity, was used very little until recently. Just as least squares minimizes the sum of squares of the residuals, L1 minimizes the sum of absolute values of the residuals.

L1 is the maximum likelihood estimate when the errors are distributed as a double exponential (Laplace), and is the logical objective in some situations. One reason for the increased interest in L1 regression is that it is robust with respect to heavy-tailed distributions. It is, however, susceptible to high leverage points, and has asymptotic efficiency of about 64% at the Gaussian distribution.


REFERENCES:
Barrodale, I. and Roberts, F. D. K. (1973). An Improved Algorithm for Discrete L1 Linear Approximations. SIAM Journal of Numerical Analysis. 10, 839-848.

Barrodale, I. and Roberts, F. D. K. (1974). Solution of an Overdetermined System of Equations in the L1 Norm. Communications of the ACM, 17, 319-320.

Bloomfield, P. and Steiger, W. L. (1983). Least Absolute Deviations: Theory, Applications, and Algorithms. Birkhauser, Boston, Mass.


SEE ALSO:
ltsreg , lsfit , lm , rreg , hat .

EXAMPLES:
l1fit(stack.x, stack.loss)