# Correlating time series for 20 regions (SPSS)

I have a question to which I can't find an answer although I spent really awfully lot of time searching.

I have time series data for about 20 regions of a country. Each time series covers 20 years.

I want to measure to what extent the evolution of the variable x followed one pattern in the regions. I'm sure it did to some extent but I want to argue in my paper that they follow a similar pattern, so I need an exact measure.

I was thinking about just correlating the data for the regions, but the cross-table I receive is not enough for me to conclude how high the similarities were. Any ideas?

I saw the option autocorrelation and crosscorrelation but I guess that's not the thing I'm looking for. It seems that the forecasting option is also not the best way to do that. I want to mention the statistical analysis only at the very beginning of my paper - then I go into qualitative case studies to prove my point, so I don't need to propose a huge model for the the statistical data.

I will appreciate your help.

• EDIT -

My hypothesis is theory-driven. I assume x and y are causaly linked. Theoretically it makes sense. I've investigated the country qualitatively (historical analysis) and it seems to make sense. I've also checked it with country-level statistical data and there's a huge correlation between x and y, but I only have data for 22 years so I'm afraid the correlation is just a coincidence. I'm asking myself for example whether the correlation is not caused by changes in some, few, regions. That would invalidate by causal explanation. That's why I want to see if the data series are correlated - I've seen charts and all the regions seem to follow the pattern visible in the country-level data, but I want to be sure.

I would love to check correlations of x and y on the regional level too! No idea how to do that (but that's less important, simply because I have some doubts whether the regional data I found on y is reliable and have no other data source).

• As for the linearity, you cannot know whether the series is linear or not unless you tested it, and the types of non-linearity you can figure out are actually those that can easily be linearized. 1) Why do you believe it be not linear? 2) Why the correlations were insufficient. – Germaniawerks Dec 26 '13 at 15:31
• The correlations: because I would like to have just one measure showing the level of correlation for the whole model. And not many corr. coefficients. I don't think I can just take the average correlation value, can I? With "not linear" I meant that the data series for individual regions don't just follow one simple linear pattern but fluctuate a lot. Also some of the regions show from the very beginning higher levels of x than others. Not sure, if I used the term correctly in the context. I don't understand what "This is a comment which I cannot add, so please convert" refers to. – agnieszka Dec 26 '13 at 15:38
• You're right, average correlation cannot be taken. But you can transform coefficients so that it can be. It's called the Fisher transformation of correlation coefficient. r'= arctanh(r) – Germaniawerks Dec 26 '13 at 15:42
• The linearity in time series means something different, not that it does not follow a straight line, but that the series can be represented by the so called Wold representation and I think, you need not to be bothered by that in what are you doing. – Germaniawerks Dec 26 '13 at 15:49
• I am not lecturing: in my role as moderator I am pointing out points of potential confusion and ambiguity in your question and requesting clarification, without which you might not get helpful answers. Since you claim to have a hypothesis, please edit your question to indicate its nature and how it was derived (because the answers, as of course you already know, depend on whether you developed it from the data or independently of the data). – whuber Dec 26 '13 at 17:01

## 2 Answers

Looks like you might want to do a time series similarity analysis. There is a SAS procedure called PROC SIMILARITY which would identify how similar a target variable(y) is with input(x) variable. I'm sure there is an R equivalent, however I'm not sure if there is an SPSS equivalent. See the example in this website, looks similar to what you are trying to achieve. There is a path and cost statistic and would tell you how similar two time series are.

Hope this is helpful

• Thanks, proc similarity sounds like what I'm looking for. Unfortunately I don't find a SAS trial version online so I have to keep searching for something else. – agnieszka Dec 27 '13 at 5:21

I think 20 years of data is plenty. Let's assume that the variable you are looking at is the Unemployment rate for 20 different regions over a 20 year time series. You already looked at a correlation table 20 x 20, and found that Unemployment rate at the regional level is highly correlated.

To analyze their respective patterns, you could run a simple linear regression for each of those regional Unemployment rate (dependent variable) with the National Unemployment rate as the independent variable. This way you would have a linear regression equation for each of those regional Unemployment rate variable characterized by a slope vs the National Unemployment rate and a constant. Each regional variable will have a different pattern (different Slope and Constant). But, directionally they would be similar. Also, each linear regression would divulge the statistical significance of the relationship between the specific Regional Unemployment rate and the National one... or whatever is the x variable you are looking at... the rational would be the same.

• Before looking at correlations she should at least look if they are stationary. If they are not stationary, she could look into cointegration! That seems to be a modern version. – kjetil b halvorsen Apr 20 '17 at 8:33