GCCmatrix function

Generalized Cross-Correlation Matrix

Generalized Cross-Correlation Matrix

Built the GCC similarity matrix between time series proposed in Alonso and Peña (2019).

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).

Returns

A list containing:

  • DM - A matrix object with the distance matrix.
  • k_GCC - The lag used to calculate GCC measure.

Examples

data(TaiwanAirBox032017) output <- GCCmatrix(TaiwanAirBox032017[,1:3])

References

Alonso, A. M. and Peña, D. (2019). Clustering time series by linear dependency. Statistics and Computing, 29(4):655–676.

  • Maintainer: Antonio Elias
  • License: GPL-3
  • Last published: 2022-04-27

Useful links