db_hom_oga {outliers.ts.oga} | R Documentation |
Detecting and cleaning outliers in a homogeneous time series database with OGA
Description
Detects and cleans Additive Outliers (AOs) and Level Shifts (LSs) in time series that form a homogeneous database, i.e. all series are defined similarly, have the same length and the same frequency. The function runs in parallel on the computer cores.
Usage
db_hom_oga(Y,s=NULL)
Arguments
Y |
The database, a |
s |
Optional, the time series frequency, i.e., the number of observations per unit of time ( |
Details
The function applies the single_oga
function to each of the time series that make up the database to detect outlier effects and clean the series of such effects. This process is run in parallel on the computer cores, which saves a lot of computational cost. The function provides a matrix
with the original series cleaned from the effect of the AOs and LSs, in addition to the location, size and t-statistic corresponding to each of them.
Value
n_AOs |
A |
n_LSs |
A |
AOs |
A |
LSs |
A |
Y_clean |
The cleaned database, a |
result |
A message indicating when the procedure has worked correctly or the problem encountered if the procedure stops. |
Note
The computational cost depends on the size of the database and the level of contamination of the series. Note that the function may take several minutes if the database contains hundred of series with thousands of observations.
Author(s)
Pedro Galeano.
References
Galeano, P., Peña, D. and Tsay, R. S. (2024). Efficient outlier detection in heterogeneous time series databases. Working paper, Universidad Carlos III de Madrid.
See Also
Examples
# Load FREDMDApril19 dataset from the SLBDD package
data("FREDMDApril19",package="SLBDD")
# Define frequency s
s <- 12
# Apply the procedure to the first 10 time series in FREDMDApril19
Y <- FREDMDApril19[,1:10]
out_db_hom_oga <- db_hom_oga(Y,s=s)