mscarm.filter: MSCARM (Multivariate Slope Comparing Adaptive Repeated...

View source: R/mscarm.filter.R

mscarm.filterR Documentation

MSCARM (Multivariate Slope Comparing Adaptive Repeated Median)

Description

A multivariate version of the scarm.filter which also gives information about parallel running components of the multivariate time series

Usage

mscarm.filter(time.series,
              right.width=30, 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, autocorrelations="automatic",
              c.bound=3, r.bound=0)

Arguments

time.series

a numeric matrix or multivariate time series object.

right.width

a positive integer ≥ 5 defining the fixed width of the right-hand window used for the SCARM test; the choice of right.width is crucial to distinguish between a patch of outliers and a signal change.

min.left.width

a positive integer right.width defining the minimum width of the left-hand window used for testing.

min.width

a positive integer ≥ 5 specifying the minimum window width.

max.width

a positive integer min.width and right.width + min.left.width specifying the maximum window width.

sign.level

significance level of the SCARM test procedure; must be a value in (0,0.5).

bound.noise.sd

a lower bound for the estimate of the noise standard deviation; this bound ensures that the noise scale estimate cannot be zero due to ties in the data; must be a value > 0.

rtr

if rtr=TRUE, the signal estimation is restricted to the range of the rightmost min.width observations.

autocorrelations

the mscarm.filter is developed for non-autocorrelated data, but can be adapted to work for AR(1) processes with parameter φ = -0.9,-0.6,...,0.9; autocorrelations must be either "no" (φ=0), "high.positive" (φ=0.9), "moderate.positive" (φ=0.6), "small.positive" (φ=0.3), "small.negative" (φ=-0.3), "moderate.negative (φ=-0.6)", "high.negative (φ=-0.9)" or "automatic"; if autocorrelations="automatic", the true parameter φ is estimated at each time point.

c.bound

the bound for the SSM (Similar Slope Monitoring) statistic which is the absolute difference of RM (Repeated Median) trend estimates (of two univariate time series) relative to the estimated standard deviation of this difference; if the SSM statistic is not larger than c.bound, a relationship between the two time series is assumed; c.bound must be a value >0.

r.bound

the bound for the ratio of adapted window widths (of two univariate time series); a relationship between the two time series is only possible, if this ratio (smaller window width divided by larger window width) is smaller than r.bound; r.bound must be a value in [0,1].

Details

The mscarm.filter is a procedure for real-time signal extraction from noisy and outlier-contaminated instationary multivariate time series. It is based on Repeated Median regression (Siegel, 1982) in moving time windows. At each time point t the test procedure of the SCARM filter (Borowski and Fried, 2011) 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). At each time point t, the mscarm.filter uses the Similar Slope Monitoring (SSM) method to build blocks of currently interrelated univariate time series. This information is given to the user and is used to improve the signal estimations. A detailed description of the mscarm.filter can be found in Borowski (2012).

Value

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

signal.est

a matrix containing the signal estimations

slope.est

a matrix containing the slope (or trend) estimations

adapted.width

a matrix containing the adapted window widths

noise.sd.est

a matrix containing the estimated noise standard deviations

scarm.signal.est

a matrix containing the signal estimates of the univariate SCARM

scarm.width

a matrix containing the adapted window widths of the univariate SCARM

scarm.statistic

a matrix containing the SCARM test statistics

scarm.critval

a matrix containing the critical values of the SCARM test

ssm.statistic

a matrix containing the SSM statistics

blocks

a matrix of the blocks built by the SSM procedure

acf.lag.one

a matrix containing the estimated autocorrelations at lag one for each time point; estimation is done on the recent max.width observations at each time point

time.series

the original input data

In addition, the input arguments used for the analysis are returned as list members.

Application of the function plot to an object of class mscarm.filter returns a plot showing the original time series with the filtered output. If info==TRUE (default), a plot showing the results of the SSM procedure is given.

Author(s)

Matthias Borowski

References

Borowski, M. (2012) Echtzeit-Extraktion relevanter Information aus multivariaten Zeitreihen basierend auf robuster Regression, PhD thesis, TU Dortmund University (in German).

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.

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

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

See Also

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

Examples

## Not run: 
# Multivariate time series
data(multi.ts)

# apply MSCARM Filter 
mscarm.extr <- mscarm.filter(multi.ts)
plot(mscarm.extr)

## End(Not run)

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