Regarding your hypothesis, it's unclear what data you have, and what the nature of that data may be, but if your time series have a nonstationary pattern, that will result odd ACF/PACF/CCF plots. How familiar are you with AR and MA models? The sinusoidal pattern you see in the CCF/ACF is typical for certain time series structures. The correlation between the two occurs at $y_t$ and $x_. To answer your question, here is an example: set.seed(123) I'd also love to hear of alternative approaches to quantifying the relationship between two time-series. I've got multiple independent experiments featuring these time series and I see a sinusoidal pattern in a majority of them (although the 'sine wave' has a different amplitude and frequency from plot to plot). Is my interpretation of the output correct? I assume so after running some tests of the form: x <- rnorm(10)īut given how surprised by the result I feel, I want to double check.Īssuming that my interpretation is correct, could there any other explanation for this almost sinusoidal shape I see in the results? (I'm thinking that perhaps there is some feature to my data that could artificially cause these shapes - I've no intuition around this!). You have to left shift (advance) the cross-correlation sequence to align the time series. The wavelet transform of y is the second input to modwtxcorr.Because the second input of modwtxcorr is shifted relative to the first, the peak correlation occurs at a negative delay. In fact, I can't think of how changes in y might induce a change in x at some point in the future, despite what I see here. The cross-correlation sequence peaks at a delay of -0.3 seconds. I'm really surprised by this because my hypothesis was that x would lead to negative changes in y, and therefore I expected to see the negative correlation at negative values of the lag, k.
As I understand it, the conclusion here is that x at time t+k is negatively correlated with y at time t, where the lag, k = 2,3,4,5,6.
The output of my code is shown below, where I'm running ccf(x,y). As a first step, I checked the cross correlation function (using ccf() in R). I am working with two time series and I am interested in understanding the relationship between them. EViews provides autocorrelation and partial autocorrelation functions, Q-statistics, and cross-correlation functions, as well as unit root tests (ADF, Phillips-Perron, KPSS, DFGLS, ERS, or Ng-Perron for single time series and Levin-Lin-Chu, Breitung, Im-Pesaran-Shin, Fisher, or Hadri for panel data), cointegration tests (Johansen with MacKinnon.