lad.fit {L1pack} | R Documentation |
Fitter functions for least absolute deviation (LAD) regression
Description
This function is a switcher among various numerical fitting functions
(lad.fit.BR
, and lad.fit.EM
). The argument method
does the switching: "BR"
for lad.fit.BR
, etc. This should
usually not be used directly unless by experienced users.
Usage
lad.fit(x, y, method = "BR", tol = 1e-7, maxiter = 200)
Arguments
x |
design matrix of dimension |
y |
vector of observations of length |
method |
currently, methods |
tol |
the relative tolerance for the iterative algorithm. Default is |
maxiter |
The maximum number of iterations for the |
Value
a list
with components:
coefficients |
a named vector of coefficients. |
scale |
final scale estimate of the random error. |
residuals |
the residuals, that is response minus fitted values. |
fitted.values |
the fitted values. |
SAD |
the sum of absolute deviations. |
weights |
estimated |
basic |
basic observations, that is observations with zero residuals. |
logLik |
the log-likelihood at convergence. |
See Also
Examples
x <- cbind(1, stack.x)
fm <- lad.fit(x, stack.loss, method = "BR")
fm