ltsReg(x, ...)## S3 method for class 'formula':
ltsReg(formula, data, \dots,
model = TRUE, x.ret = FALSE, y.ret = FALSE)
## S3 method for class 'default':
ltsReg(x, y, intercept = TRUE, alpha = NULL, nsamp = 500,
adjust = FALSE, mcd = TRUE, qr.out = FALSE, yname = NULL,
seed = 0, control, \dots)
formula
of the form y ~ x1 + x2 + ...
.formula
are to be taken.logical
s indicating if the
model frame, the model matrix and the response are to be returned,
respectively.x
.intercept = TRUE
alpha
must
be a value between 0.5 and 1.nsamp = 500
.adjust = FALSE
.qr
); defaults to false.yname = NULL
seed = 0
ltsReg
returns an object of class "lts"
.
The function summary
is used to obtain and print
a summary table of the results. The generic accessor functions coefficients
,
fitted.values
and residuals
extract various useful features of the value returned by
ltsReg
.
An object of class lts
is a list
containing at
least the following components:
intercept=TRUE
), obtained after reweighting.best
is equal to quan
.y
containing the fitted values
of the response after reweighting.y
containing the residuals from
the weighted least squares regression.alpha
.intercept
.intercept=TRUE
).y
containing the raw residuals
from the regression. As always, the formula interface has an implied intercept term which can be
removed either by y ~ x - 1
or y ~ 0 + x
. See
formula
for more details.
P. J. Rousseeuw and A. M. Leroy (1987) Robust Regression and Outlier Detection. Wiley.
P. J. Rousseeuw and K. van Driessen (1999) Computing LTS Regression for Large Data Sets; Technical Report, University of Antwerp, submitted
P. J. Rousseeuw and K. van Driessen (1999) A fast algorithm for the minimum covariance determinant estimator. Technometrics 41, 212--223.
Pison, G., Van Aelst, S., and Willems, G. (2002) Small Sample Corrections for LTS and MCD. Metrika 55, 111-123.
covMcd
;
summary.lts
for summaries.data(heart)
## Default method works with 'x'-matrix and y-var:
heart.x <- data.matrix(heart[, 1:2]) # the X-variables
heart.y <- heart[,"clength"]
ltsReg(heart.x, heart.y)
data(stackloss)
ltsReg(stack.loss ~ ., data = stackloss)
Run the code above in your browser using DataLab