User`s guide

Smoothing Data
2-17
Robust Smoothing Procedure
If your data contains outliers, the smoothed values can become distorted, and
not reflect the behavior of the bulk of the neighboring data points. To overcome
this problem, you can smooth the data using a robust procedure that is not
influenced by a small fraction of outliers. For a description of outliers, refer to
Marking Outliers on page 2-27.
The Curve Fitting Toolbox provides a robust version for both the lowess and
loess smoothing methods. These robust methods include an additional
calculation of robust weights, which is resistant to outliers. The robust
smoothing procedure follows these steps:
1 Calculate the residuals from the smoothing procedure described in the
previous section.
2 Compute the robust weights for each data point in the span. The weights are
given by the bisquare function shown below.
r
i
is the residual of the ith data point produced by the regression smoothing
procedure, and MAD is the median absolute deviation of the residuals:
The median absolute deviation is a measure of how spread out the residuals
are. If r
i
is small compared to 6MAD, then the robust weight is close to 1. If
r
i
is greater than 6MAD, the robust weight is 0 and the associated data point
is excluded from the smooth calculation.
3 Smooth the data again using the robust weights. The final smoothed value
is calculated using both the local regression weight and the robust weight.
4 Repeat the previous two steps for a total of five iterations.
w
i
1( r
i
6MAD()
2
)
2
0
=
r
i
6MAD<
r
i
6MAD
MAD median r()=