l1fit {L1pack} | R Documentation |
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 = TRUE, tolerance = 1e-07, print.it = TRUE)
Arguments
x |
vector or matrix of explanatory variables. Each row corresponds to an
observation and each column to a variable. The number of rows of |
y |
numeric vector containing the response. Missing values are not allowed. |
intercept |
logical flag. If |
tolerance |
numerical value used to test for singularity in the regression. |
print.it |
logical flag. If |
Details
The Barrodale-Roberts algorithm, which is a specialized linear programming algorithm, is used.
Value
list defining the regression (compare with function lsfit
).
coefficients |
vector of coefficients. |
residuals |
residuals from the fit. |
message |
character strings stating whether a non-unique solution is possible,
or if the |
References
Barrodale, I., Roberts, F.D.K. (1973). An improved algorithm for discrete L1 linear approximations. SIAM Journal of Numerical Analysis 10, 839-848.
Barrodale, I., 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., Steiger, W.L. (1983). Least Absolute Deviations: Theory, Applications, and Algorithms. Birkhauser, Boston, Mass.
Examples
l1fit(stack.x, stack.loss)