Forward
Moving Average Smoothing
forwardMovingAverage(integer
numberToAverageOver)
Derive a new time series from the forward moving average of numberToAverageOver values in the current time series. numberToAverageOver must be an integer greater than 2. If the averaging interval contains a missing value, the smoothed value is computed from the remaining valid values in the interval. However, if there are less than 2 valid values in the interval, the value in the resultant data set is set to missing.
Parameters:
numberToAverageOver – An integer containing the number of values to average
over for computing the forward moving average.
Example: tsAveraged = tsData.forwardMovingAverage(4)
Returns: A new TimeSeriesMath object.
Generated Exceptions: Throws a hec.hecmath.HecMathException if the numberToAverageOver is less than 2.