
Last chance! 50% off unlimited learning
Sale ends in
scarm.filter(x, right.width=30, min.left.width=right.width,
min.width=right.width/3, max.width=180,
sign.level=0.001, bound.noise.sd=1)
scarm.filter
returns an object of class scarm.filter
.
An object of class scarm.filter
is a list containing the
following components:plot
to an object of class
scarm.filter
returns a plot showing the original time series
with the filtered output.right.width
is crucial to distinguish between a patch of outliers and a signal change. If a patch of < k aberrant observations is to be treated as an outlier-patch, it is recommended to set right.width = 3*k
.
A more detailed description of the filter can be found in Borowski and Fried (2011).robreg.filter
, adore.filter
, madore.filter
.# # # # # # # # # #
# Short and noisy time series
set.seed(12)
N <- 300
noise <- rnorm(N)
signal <- c(rep(0,200),rep(10,100))
x <- signal+noise
# SCARM Filter
signal.extr <- scarm.filter(x)
par(mfrow=c(2,1))
ts.plot(x, col="darkgrey", main="time series data and signal extraction")
lines(signal.extr$signal)
ts.plot(signal.extr$adapted.width, main="adapted window width")
Run the code above in your browser using DataLab