How do you tell if the correlations at different lags obtained from the cross-correlation (ccf function) of two time series are significant.
Asked
Active
Viewed 1.7k times
16
-
1Have a look at my question here: http://stats.stackexchange.com/questions/1881/analysis-of-cross-correlation-between-point-processes – 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? – user4823 May 31 '11 at 20:50
2 Answers
24
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).
Rob Hyndman
- 56,782
-
Type the name of the function in the console. Otherwise, the source code for core R functions is all on svn. e.g., https://svn.r-project.org/R/trunk/src/library/stats/R/acf.R – Rob Hyndman Oct 11 '22 at 21:26
5
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.
Victor
- 51
- 1
- 1
-
Do you mean Bendat and Piersol, 2000. Single-Input/Output Relationships. I could not find any article from those authors in 2010. – have fun Mar 02 '18 at 10:28
-
-