Cross-correlation significance in R

How do you tell if the correlations at different lags obtained from the cross-correlation (ccf function) of two time series are significant.

• Have a look at my question here: stats.stackexchange.com/questions/1881/…
– nico
Sep 27 '10 at 16:35
• hi. I have one question. How can I test the significance of the correlation coefficient? I have two time series and I want to test if they are cross correlation . should I do prewhitening the two series before comuputing the ccf or there are an easy way? May 31 '11 at 20:50

The variance of the cross-correlation coefficient under the null hypothesis of zero correlation is approx $1/n$ where $n$ is the length of the series. The coefficients are also asymptotically normal. So approximate critical values (at the 5% level) are $\pm 2/\sqrt{n}$.

These critical values are plotted automatically in R using ccf(x,y).

The cross-correlation coefficient does not measure dependence between time series. The proper tool for it is the coherence function. For example, see Bendat and Piersol, 2010.