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))=b,
where b and cc are user-chosen tuning constants.
In this package the function rho is one of
Tukey's bisquare family.
The breakdown point of the estimator is min(b, 1-b),
so the optimal choice for b is 0.5. To obtain a
consistent estimator the constant
cc should be chosen such that E(rho(Z, cc)) = b, where
Z is a standard normal random variable.
Usage
scaleM(
u,
delta = 0.5,
tuning.chi = 1.547645,
family = "bisquare",
max.it = 100,
tol = 1e-06,
tolerancezero = .Machine$double.eps
)
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
tuning.chi
the tuning object for the rho function as returned
by lmrobdet.control, bisquare, mopt or opt.
It should correspond to the family of rho functions specified in the argument family.
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
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)) / b.