lmsreg
and ltsreg
are compatibility wrappers.lqs(x, ...)## S3 method for class 'formula':
lqs(formula, data, \dots,
method = c("lts", "lqs", "lms", "S", "model.frame"),
subset, na.action, model = TRUE,
x.ret = FALSE, y.ret = FALSE, contrasts = NULL)
## S3 method for class 'default':
lqs(x, y, intercept = TRUE, method = c("lts", "lqs", "lms", "S"),
quantile, control = lqs.control(...), k0 = 1.548, seed, ...)
lmsreg(...)
ltsreg(...)
y ~ x1 + x2 + ...
.formula
are preferentially to be taken.NA
s are found. The default action is for the procedure to
fail. Alternatives include na.omit
and
TRUE
the model frame,
the model matrix and the response are returned, respectively.contrasts.arg
of model.matrix.default
.x
.model.frame
returns the model frame: for the
others see the Details
section. Using lmsreg
or
ltsreg
forces "lms"
and "lts"
respectively.Details
. This is over-ridden if
method = "lms"
.Details
.method = "S"
, currently
corresponding to Tukey's .Random.seed
. The
current value of .Random.seed
will be preserved if it is set..lqs.default
or
lqs.control
, see control
above and Details
."lqs"
. This is a list with componentsmethod == "S"
before IWLS refinement.method ==
"S"
) is based on the variance of those residuals whose absolute
value is less than 2.5 times the initial estimate.n
data points and p
regressors,
including any intercept. The first three methods minimize some function of the sorted squared
residuals. For methods "lqs"
and "lms"
is the
quantile
squared residual, and for "lts"
it is the sum
of the quantile
smallest squared residuals. "lqs"
and
"lms"
differ in the defaults for quantile
, which are
floor((n+p+1)/2)
and floor((n+1)/2)
respectively.
For "lts"
the default is floor(n/2) + floor((p+1)/2)
.
The "S"
estimation method solves for the scale s
such that the average of a function chi of the residuals divided
by s
is equal to a given constant.
The control
argument is a list with components
[object Object],[object Object],[object Object]
A. Marazzi (1993) Algorithms, Routines and S Functions for Robust Statistics. Wadsworth and Brooks/Cole.
P. Rousseeuw and M. Hubert (1997) Recent developments in PROGRESS. In L1-Statistical Procedures and Related Topics, ed Y. Dodge, IMS Lecture Notes volume 31, pp. 201--214.
predict.lqs
set.seed(123) # make reproducible
lqs(stack.loss ~ ., data = stackloss)
lqs(stack.loss ~ ., data = stackloss, method = "S", nsamp = "exact")
Run the code above in your browser using DataLab