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