This function computes an M-scale, which is a robust
scale (spread) estimator.
M-estimators of scale are a robust alternative to
the sample standard deviation. Given a vector of
residuals r, the M-scale estimator s
solves the non-linear equation mean(rho(r/s, cc))=delta,
where delta determines the breakdown point of the
estimator, and cc is a tuning parameter
calculated to obtain consistency under a Gaussian model.
The breakdown point of the estimator is min(delta, 1-delta),
so the optimal choice for delta is 0.5. To obtain a
consistent estimator the constant
cc is chosen such that E(rho(Z, cc)) = delta, where
Z is a standard normal random variable.
Usage
scaleM(
u,
delta = 0.5,
family = "bisquare",
max.it = 100,
tol = 1e-06,
tolerancezero = .Machine$double.eps,
tuning.chi = lmrobdet.control(family = family, bb = delta)$tuning.chi
)
Value
The scale estimate value at the last iteration or at convergence.
Arguments
u
vector of residuals
delta
the right hand side of the M-scale equation
family
string specifying the name of the family of loss function to be used (current valid
options are "bisquare", "opt" and "mopt").
max.it
maximum number of iterations allowed
tol
relative tolerance for convergence
tolerancezero
smallest (in absolute value) non-zero value accepted as a scale. Defaults to .Machine$double.eps
tuning.chi
the tuning object as returned
by lmrobdet.control, bisquare, mopt,
or opt. It defaults to the value that results
in a consistent scale estimator for the specified family
of loss functions and breakdown point as set by delta.
The iterative algorithm starts from the scaled median of
the absolute values of the input vector, and then
cycles through the equation s^2 = s^2 * mean(rho(r/s, cc)) / delta.