ROBUST_SIGMA
Name
ROBUST_SIGMA
Purpose
Calculate a resistant estimate of the dispersion of a distribution.
Explanation
For an uncontaminated distribution, this is identical to the standard
deviation.
Calling Sequence
result = ROBUST_SIGMA( Y, [ /ZERO, GOODVEC = ] )
Input
Y = Vector of quantity for which the dispersion is to be calculated
Optional Input Keyword
/ZERO - if set, the dispersion is calculated w.r.t. 0.0 rather than the
central value of the vector. If Y is a vector of residuals, this
should be set.
OPTIONAL OUPTUT KEYWORD:
GOODVEC = Vector of non-trimmed indices of the input vector
Output
ROBUST_SIGMA returns the dispersion. In case of failure, returns
value of -1.0
Procedure
Use the median absolute deviation as the initial estimate, then weight
points using Tukey's Biweight. See, for example, "Understanding Robust
and Exploratory Data Analysis," by Hoaglin, Mosteller and Tukey, John
Wiley & Sons, 1983, or equation 9 in Beers et al. (1990, AJ, 100, 32)
REVSION HISTORY:
H. Freudenreich, STX, 8/90
Replace MED() call with MEDIAN(/EVEN) W. Landsman December 2001
Don't count NaN values W.Landsman June 2010