# lmrob.S: S-regression estimators In robustbase: Basic Robust Statistics

## Description

Computes an S-estimator for linear regression, using the “fast S” algorithm.

## Usage

 1 2 3 lmrob.S(x, y, control, trace.lev = control\$trace.lev, only.scale = FALSE, mf = NULL)

## Arguments

 x design matrix (n * p) y numeric vector of responses (or residuals for only.scale=TRUE). control list as returned by lmrob.control trace.lev integer indicating if the progress of the algorithm should be traced (increasingly); default trace.lev = 0 does no tracing. only.scale logical indicating if only the scale of y should be computed. In this case, y will typically contain residuals.
 mf unused and deprecated.

## Details

This function is used by lmrob.fit and typically not to be used on its own (because an S-estimator has too low efficiency ‘on its own’).

By default, the subsampling algorithm uses a customized LU decomposition which ensures a non singular subsample (if this is at all possible). This makes the Fast-S algorithm also feasible for categorical and mixed continuous-categorical data.

One can revert to the old subsampling scheme by setting the parameter subsampling in control to "simple".

## Value

By default (when only.scale is false), a list with components

 coefficients numeric vector (length p) of S-regression coefficient estimates. scale the S-scale residual estimate
 fitted.values numeric vector (length n) of the fitted values. residuals numeric vector (length n) of the residuals. rweights numeric vector (length n) of the robustness weights. k.iter (maximal) number of refinement iterations used. converged logical indicating if all refinement iterations had converged. control the same list as the control argument.

If only.scale is true, the computed scale (a number) is returned.

## Author(s)

Matias Salibian-Barrera and Manuel Koller; Martin Maechler for minor new options and more documentation.