Syntax

Description

Given a sequence of nn observations recorded at equally spaced intervals, nag_smooth_data_runningmedian (g10ca) fits a smooth curve through the data using one of two smoothers. The two smoothers are based on the use of running medians and averages to summarise overlapping segments. The fit and the residuals are called the smooth and the rough respectively. They obey the following:

Data = Smooth + Rough.

Data=Smooth+Rough.

The two smoothers are:

4253H,twice consisting of a running median of 44, then 22, then 55, then 33 followed by hanning. Hanning is a running weighted average, the weights being 1 / 41/4, 1 / 21/2 and 1 / 41/4. The result of this smoothing is then reroughed by computing residuals, applying the same smoother to them and adding the result to the smooth of the first pass.

3RSSH,twice consisting of a running median of 33, two splitting operations named S to improve the smooth sequence, each of which is followed by a running median of 33, and finally hanning. The end points are dealt with using the method described by Velleman and Hoaglin (1981). The full smoother 3RSSH,twice is produced by reroughing as described above.

The compound smoother 4253H,twice is recommended. The smoother 3RSSH,twice is popular when calculating by hand as it requires simpler computations and is included for comparison purposes.