This function is used to fit linear models considering Laplace errors.
Usage
lad(formula, data, subset, na.action, method = "BR", tol = 1e-7, maxiter = 200,
x = FALSE, y = FALSE, contrasts = NULL)
Value
An object of class lad representing the linear model fit. Generic
function print, show the results of the fit.
The functions print and summary are used to obtain and print a summary
of the results. The generic accessor functions coefficients, fitted.values
and residuals extract various useful features of the value returned by lad.
Arguments
formula
an object of class "formula": a symbolic description of
the model to be fitted.
data
an optional data frame containing the variables in the model. If
not found in data, the variables are taken from environment(formula),
typically the environment from which lad is called.
subset
an optional expression indicating the subset of the rows of
data that should be used in the fit.
na.action
a function that indicates what should happen when the data contain NAs.
method
character string specifying the fitting method to be used; the options
are "BR" Barrodale and Roberts' method (the default) and "EM" for an EM
algorithm using IRLS.
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.
x, y
logicals. If TRUE the corresponding components of the fit (the model matrix,
the response) are returned.
contrasts
an optional list. See the contrasts.arg of model.matrix.default.