madore.filter: A multivariate adaptive online repeated median filter

View source: R/madore.filter.R

madore.filterR Documentation

A multivariate adaptive online repeated median filter

Description

Procedure for robust signal extraction from a multivariate time series by a moving window technique with adaptive window width selection (multivariate adaptive online repeated median filter). The window width adaption is based on the univariate adore.filter.

Usage

madore.filter(Y, byrow=FALSE,
              min.width=10, max.width=200,
              test.sample.size=min.width/2,
              width.search="geometric",
              rtr.size=min.width, sign.level=0.1,
              NA.sample.size=min.width, minNonNAs=min.width/2)

Arguments

Y

a numeric matrix or (multivariate) time series object.

byrow

logical. If FALSE (the default), the filtering is done by columns, otherwise the filtering is done by rows.

min.width

a positive integer ≥ 10 specifying the minimal width of the moving time window.

max.width

a positive integer min.width specifying the maximal width of the moving time window. If min.width = max.width, the window width is fixed.

test.sample.size

a positive integer in [5, min.width] defining a test window of the rightmost test.sample.size time points within the current time window. The Repeated Median (RM) regression residuals within the test window are used for a goodness of fit test (see adore.filter) for finding an adequate window width. For more details about the test, see Schettlinger, Fried, Gather (2010).

width.search

a character string defining the search algorithm used for finding an adequate window width at each point in time.

"linear"

The linear search always results in the largest window width possible and hence yields the smoothest online signal. However, if sudden changes (like level shifts) appear in the signal it requires a lot of computation time and thus, an increased variability of the extracted signal may be observed.

"binary"

The binary search is recommended if it can be expected that the window width needs to be reduced drastically from a large to a very small value at certain times (for example at level shifts or trend changes). However, it may not always result in the largest possible window width.

"geometric" (default)

The geometric search is as fast as the binary search but it puts more weight on large window widths. It offers a good compromise between the linear and the binary search (computation time vs. smooth output signal).

rtr.size

a non-negative integer specifying the size of a subset of the most recent observations within each window. The signal estimation is restricted to the range of the observations within this subset.

sign.level

the level of significance for the goodness of fit test (see adore.filter) for finding an adequate window width. For more details about the test, see Schettlinger, Fried, Gather (2010).

NA.sample.size

a positive integer in [10, min.width] specifying the size of a subset of the most recent observations within each window. See minNonNAs.

minNonNAs

a positive integer in [5, NA.sample.size]. If a variable does not offer at least minNonNAs non-missing observations within the subset specified by NA.sample.size, the signal is not estimated for this variable at this time point t.

Details

The madore.filter is based on Repeated Median regression (Siegel, 1982) in moving time windows and serves for separating signals from noise and outliers in multivariate time series. At each time point t the test procedure of the adaptive online Repeated Median filter (Schettlinger, Fried, Gather, 2010) is used to determine an appropriate window width n(t) in [min.width, max.width]. Then the signal vector at time t is estimated within the time window (t-n(t)+1,…,t) by a slight modification of the multivariate Trimmed Repeated Median-Least Squares regression (Lanius, Gather, 2010). A more detailed description of the madore.filter can be found in Borowski, Schettlinger, Gather (2009).

Value

madore.filter returns an object of class madore.filter. An object of class madore.filter is a list containing the following components:

signals

a matrix containing the estimated signal vectors at each time point t.

widths

a matrix containing the individual window widths of each variable at each time point t.

overall.width

a vector containing the overall window widths at each time point t.

In addition, the original input data is returned as list member Y, and the settings used for the analysis are returned as the list members byrow, min.width, max.width, start.width, test.sample.size, width.search, rtr.size, extr.delay, NA.sample.size, and minNonNAs. Application of the function plot to an object of class madore.filter returns a plot showing the original multivariate time series with the filtered output.

Author(s)

Matthias Borowski

References

Borowski, M., Schettlinger, K., Gather, U. (2009) Multivariate Real Time Signal Extraction by a Robust Adaptive Regression Filter, Communications in Statistics - Simulation and Computation 38, 426-440.

Lanius, V., Gather, U. (2010) Robust Online Signal Extraction from Multivariate Time Series, Computational Statistics and Data Analysis 54(4), 966-975.

Schettlinger, K., Fried, R., Gather, U. (2010) Real Time Signal Processing by Adaptive Repeated Median Filters, International Journal of Adaptive Control and Signal Processing 24(5), 346-362.

Siegel, A.F. (1982) Robust Regression Using Repeated Medians, Biometrika 69(1), 242-244.

See Also

robreg.filter, adore.filter, scarm.filter, mscarm.filter.

Examples

## Not run: 
data(multi.ts)
extr <- madore.filter(multi.ts)
plot(extr)

## End(Not run)   

robfilter documentation built on Nov. 10, 2022, 5:41 p.m.