Learn R Programming

robfilter (version 3.2)

scarm.filter: SCARM (Slope Comparing Adaptive Repeated Median)

Description

A procedure for robust online signal extraction from univariate time series ("smoothing") by a moving window technique with adaptive window width selection based on Repeated Median regression

Usage

scarm.filter(x, right.width=15, min.left.width=right.width, min.width=floor(right.width/3), max.width=200, sign.level=0.001, bound.noise.sd=0.01, rtr=TRUE, noise.sd.est.method="Q.adj", autocorrelations="no")

Arguments

Value

scarm.filter returns an object of class scarm.filter. An object of class scarm.filter is a list containing the following components:signal.esta vector containing the signal estimationsslope.esta vector containing the slope (or trend) estimationsadapted.widtha vector containing the adapted window widthstest.statistica vector containing the SCARM test statisticscritvalsa vector containing the critical values for test decisionnoise.sda vector containing the estimates of the noise standard deviationslope.diffa vector containing the differences of the Repeated Median slopes estimated in the left-hand and right-hand windowtseriesthe original input dataIn addition, the input arguments used for the analysis are returned as list members. Application of the function plot to an object of class scarm.filter returns a plot showing the original time series with the filtered output.

Details

The scarm.filter fits a Repeated Median (RM, Siegel, 1982) regression line to a moving window sample with length varying between min.width and max.width. For each time point, the window width is adapted to the current data situation by a test comparing two RM slopes estimated in separated sub-windows, a right-hand and a left-hand window. A more detailed description of the filter can be found in Borowski and Fried (2011).

References

Borowski, M. and Fried, R. (2011) Robust repeated median regression in moving windows with data-adaptive width selection, Discussion Paper 28/2011, SFB 823, TU Dortmund University. Gelper, S., Schettlinger, K., Croux, C., and Gather, U. (2009) Robust online scale estimation in time series: A model-free approach, Journal of Statistical Planning and Inference, 139 (2), 335-349. Siegel, A.F. (1982) Robust Regression Using Repeated Medians, Biometrika 69 (1), 242-244.

See Also

robreg.filter, adore.filter, madore.filter.

Examples

Run this code
# # # # # # # # # #
# Short and noisy time series
data(multi.ts)
x <- multi.ts[,1]

# SCARM Filter 
scarm.extr <- scarm.filter(x)
plot(scarm.extr)

Run the code above in your browser using DataLab