Learn R Programming

L1pack (version 0.62-4)

lad.fit-methods: Fit a least absolute deviation (LAD) regression model

Description

Fits a linear model using LAD methods, returning the bare minimum computations.

Usage

lad.fit.BR(x, y, tol = 1e-7, level = 0.95)
lad.fit.EM(x, y, tol = 1e-7, maxiter = 200, level = 0.95)

Value

The bare bones of a lad object: the coefficients, residuals, fitted values, and some information used by summary.lad.

Arguments

x, y

numeric vectors or matrices for the predictors and the response in a linear model. Typically, but not necessarily, x will be constructed by one of the fitting functions.

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.

level

the confidence level required for estimating the nuisance parameter involved in the asymptotic covariance matrix.

See Also

lad, lad.fit, lm

Examples

Run this code
x <- cbind(1, stack.x)
z <- lad.fit.BR(x, stack.loss)
z

Run the code above in your browser using DataLab