# How to analyze correlation of multivariate time series

I have a multivariate time series with variables A, B and C. A describes growth over time and contains some outliers, where the growth suddenly increases/decreases more than usual. Neither A, B, or C includes seasonality. What I want to know is if changes in B or C cause changes in A at some later point, maybe even cause some of the outliers. How would I analyze this?

What I tried so far was to measure the Pearson Correlation coefficient between A and (time-shifted) B or C. I am not sure if this makes sense though, so I'd appreciate some input on this.

What you're calculating (the correlation between $$A$$ and lagged copies of $$B$$ and $$C$$) is called the the cross correlation. This isn't typically suitable for testing causality because it neglects the effects of autocorrelation. The problem is that autocorrelated time series may show spurious peaks in the cross correlation, even if they're truly independent. For example, imagine $$A$$ and $$B$$ contain smoothed white noise. So, they're independent and vary slowly over time (high autocorrelation). Because of the slow variation, there's a good chance we can find some lag by which we can shift $$B$$ where it will line up reasonably well with $$A$$.

Granger causality is one way to deal with this issue. The idea is to predict the value of $$A$$ using two different models: The first uses past values of $$A$$ itself. The second uses past values of both $$A$$ and $$B$$. If using past values of $$B$$ improves our prediction beyond using $$A$$ alone (as assessed by a statistical test) then we say that $$B$$ Granger-causes $$A$$.

Multivariate versions exist, so you can test the effects of both $$B$$ and $$C$$ on $$A$$. Typical Granger causality tests are based on autoregressive models, so they assume stationarity, and that causal effects are linear. But, extensions do exist if you need to loosen these assumptions.

Note that Granger causality is not 'true' causality--even if we determine that $$B$$ Granger-causes $$A$$, this doesn't necessarily imply that $$A$$ would have changed had we directly manipulated $$B$$. For example, this could happen if $$A$$ and $$B$$ have no direct causal link, but are both driven with different lags by some unobserved, third process $$H$$.

• Thank you for the detailed answer. Regarding the first paragaph: I understand that we can usually find some lag for which $A$ and $B$ line up. If, however, the correlation is largest without any lag and then gradually decreases with an increased lag, wouldn't that be a strong indication that the effect of $B$ on $A$ gradually decreases as well? I'll look into Granger causality and I understand that correlation doesn't imply causation, of course. – Johannes Stricker May 21 '19 at 16:01
• Regarding cross-correlation: I used to think that the time-lagged Pearson-Correlation coefficient IS the same as cross-correlation, but after looking at the wikipedia page for cross correlation, the formulas look quite different. This actually confuses me a lot, because there is a paragraph on normalized cross-correlation which shows the formula I used. However, I don't understand where that formula comes from and I also couldn't find any citable sources for it. – Johannes Stricker May 21 '19 at 16:06
• Re 2nd comment: I'm refering to cross correlation somewhat generically. Pearson correlation on lagged variables is a type of normalized cross correlation. Re 1st comment (in the situation where correlation peaks at zero lag) I don't quite understand what you're asking here – user20160 May 21 '19 at 16:14
• What I mean is that if $corr(A_{t0}, B) \gt corr(A_{t1}, B) \gt corr(A_{t2}, B) \gt ...$, wouldn't that be a strong indication that this correlation (even if it's small) is not caused by accident, because it decreases gradually over time? – Johannes Stricker May 21 '19 at 17:33

You don't give much information, but it looks that a Granger causality test might be useful here (you have an introduction and some pointers in the Wikipedia). Also, with stationary time series (which does not seem to be the case, at least for A) of substantial length, a cross-spectral analysis might be indicated ---just google for pointers.