rmSlopeOutliers {KarsTS} | R Documentation |
rmSlopeOutliers: slope filter
Description
This function filters the slope (difference) outliers in a time series. It finds the greater outlier, it removes the value causing it and it tries to re-fill value by linear interpolation. Then the greater outlier in the modified time series is found and so on. It is used internally.
Usage
rmSlopeOutliers(tS = NULL, origMxPosSlope = NULL, origMxNegSlope = NULL, filling = NULL)
Arguments
tS |
The time series |
origMxPosSlope |
The maximum allowed positive slope. Greater slopes are considered as outliers. |
origMxNegSlope |
The maximum allowed negative slope. Greater slopes (in absolute value) are considered as outliers. |
filling |
The positions in the time series corresponding to filled values(that is, not actual observations).When this argument is not null, the actual observations remain untouched whether if they cause outliers or not. |
Value
The smoothed time series. The function stops when there are no more outliers or when it reaches 100000 iterations. This is a safety measure to avoid infinite loops.If the time series still contains outliers, run the function again.
Author(s)
Marina Saez andreu