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,
use.correction=TRUE, control, \dots)
intercept = TRUE
"best"
or "exact"
.
Default is nsamp = 500
. If nsamp="best"
exhaustive enumeration
is done, as far as the number of trials do not exceed 5000. Iadjust = FALSE
qr.out = FALSE
yname = NULL
seed = 0
use.correction=TRUE
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:best
is equal to quan
.alpha
.intercept
.raw.cnp2
and cnp2
of length 2 respectively.
The finite sample corrections can be suppressed by setting use.correction=FALSE
.
The computations are performed
using the Fast LTS algorithm proposed by Rousseeuw and Van Driessen (1999).
The formula interface has an implied intercept term. This can be removed by using
either y ~ x - 1
or y ~ 0 + x
. See formula
for more details.covMcd
summary.lts
for summaries.
The generic functions coef
, residuals
, fitted
.data(heart)
ltsReg(heart.x, heart.y)
data(stackloss)
ltsReg(stack.loss ~ ., data = stackloss)
Run the code above in your browser using DataLab