l1fit(x, y, intercept=T, print=T)
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.
TRUE
, an intercept term is
included in the regression model.
TRUE
, then warnings about non-unique solutions and
rank deficiency are given.
lsfit
).
intercept
is
TRUE
, the initial element
is the term for the intercept.
x
matrix (plus the intercept) was
found to be rank deficient.
This component is present only if one of these conditions exists.
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.
The Barrodale-Roberts algorithm, which is a specialized linear programming algorithm, is used. Results are currently computed to single-precision accuracy only.
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.
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.
l1fit(stack.x, stack.loss)