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 n\times p.

y

vector of observations of length n.

method

currently, methods "BR" (default), and "EM" are supported.

tol

the relative tolerance for the iterative algorithm. Default is tol = 1e-7.

maxiter

The maximum number of iterations for the EM method. Default to 200.

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 EM weights.

basic

basic observations, that is observations with zero residuals.

logLik

the log-likelihood at convergence.

See Also

lad.fit.BR, lad.fit.EM.

Examples

x <- cbind(1, stack.x)
fm <- lad.fit(x, stack.loss, method = "BR")
fm

[Package L1pack version 0.41-245 Index]