outDetect | R Documentation |
Detect outliers in a time series considering the raw data and a smoothed version of it.
outDetect(x, weights = NULL, ff = c(7, 7))
x |
numeric vector |
weights |
non-increasing numeric vector used as weights for
computing a smoothed vector as a rooling window average.
Default is null and then |
ff |
numeric length two vector with the factors used to consider how many times the standard deviation one data point is out to be considered as an outlier. |
logical vector indicating if the data is an outlier with attributes as detailed bellow.
attr(, 'm') is the mean of x.
attr(, 's') is the standard devation of x.
attr(, 'ss') is the standard deviation for
the smoothed data y_t
that is defined as
y_t = \sum_{k=j}^h w_j * (x_{t-j}+x_{t+j})/2
Both s
and ss
are used to define outliers if
|x_t-m|/s>ff_1
or |x_t-y_t|/ss>ff_2
attr(, 'xs') the smoothed time series y_t
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.