Description Usage Arguments Details Value References Examples
Fitting LAD Models
1 |
x |
A matrix or vector with explanatory variables. |
y |
A vector with response variables. |
intercept |
TRUE for a model with intercept and FALSE for a model without intercept. |
The Barrodale-Roberts algorithm, which is a specialized linear programming algorithm, is used.
list defining the regression (compare with function lsfit
).
coefficients |
vector of coefficients. |
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 was found to be rank deficient. |
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.
1 2 3 | ### Using stackloss data
ladfit(stack.x, stack.loss, intercept =TRUE)
|
$coefficients
Intercept Air.Flow Water.Temp Acid.Conc.
-39.68985367 0.83188403 0.57391310 -0.06086957
$minimum
[1] 42.08116
$fitted.values
[1] 36.939131 37.000000 31.571015 20.365218 19.217392 19.791305 20.000001
[8] 20.000001 16.463769 14.020290 13.472464 12.959421 13.898551 13.802899
[15] 6.817392 7.000001 8.426088 8.000001 8.513044 13.382609 24.481160
$residuals
[1] 5.0608706 0.0000000 5.4289861 7.6347828 -1.2173911 -1.7913042
[7] -1.0000000 0.0000000 -1.4637681 -0.0202896 0.5275363 0.0405799
[13] -2.8985507 -1.8028984 1.1826082 0.0000000 -0.4260873 0.0000000
[19] 0.4869561 1.6173913 -9.4811592
$rank
[1] 4
$numIter
[1] 7
$info
[1] 1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.