Learn R Programming

SLBDD (version 0.0.4)

GCCmatrix: Generalized Cross-Correlation Matrix

Description

Built the GCC similarity matrix between time series proposed in Alonso and Pe<U+00F1>a (2019).

Usage

GCCmatrix(x, lag, model, lag.set)

Arguments

x

T by k data matrix: T data points in rows with each row being data at a given time point, and k time series in columns.

lag

Selected lag for computing the GCC between the pairs of series. Default value is computed inside the program.

model

Model specification. When the value lag is unknown for the user, the model specification is chosen between GARCH model or AR model. Default is ARMA model.

lag.set

If lag is not specified and the user wants to use instead of lags from 1 to 'lag' a non consecutive set of lags they can be defined as lag.set = c(1, 4, 7).

Value

A list containing:

  • DM - A matrix object with the distance matrix.

  • k_GCC - The lag used to calculate GCC measure.

References

Alonso, A. M. and Pe<U+00F1>a, D. (2019). Clustering time series by linear dependency. Statistics and Computing, 29(4):655<U+2013>676.

Examples

Run this code
# NOT RUN {
data(TaiwanAirBox032017)
output <- GCCmatrix(TaiwanAirBox032017[,1:3])

# }

Run the code above in your browser using DataLab