# How to analyze serial correlation [using time series]

I have a set of numeric data that is indexed by Position, from 1 to n. This is serial data in the sense that the data is ordered by the position, which corresponds to a physical structure rather than a temporal one. My question is, how do I infer the spatial scale at which the data points correlate with one another? Data points that are closer together should be related more than data points that are further apart, but to what extent?

I was told that time series analysis should be useful here. I don't have much experience in the topic, but it seems like one difference is that time only goes in one direction, while space does not have that restriction. More general series analysis tools seem like they would be helpful here.

I have been looking into autocorrelation coefficients, which will tell the relatedness of the data series with itself lagged a certain number of units. Is this the right track?

## 2 Answers

You have data in a spatial order along a line, not a time order. So while time series methods could be useful, be aware of methods that actually depends on the time order. Autocorrelation itself does not depend on the time order, you can check that by itself by calculating it the two possible ways (switching order), the results should be equal. ARIMA models, will depend on the order, so use with care.

In reality, a better fit is spatial models, which also works in 1D (some implementations might not, but that is not because of the mathematics.) For example, if you want interpolation or extrapolation, look into kriging. One interesting-looking paper. Depending on your goals, (you didn't tell us,) regression with correlated errors could be a possibility.

AutoCorrelation should give you good results. You can also try Ljung-Box test. It uses a null hypothesis that the data is independent and gives P value. If the p-value is less than the significance level, then reject the null hypothesis and we can say that data is correlated.

When using the autocorrelation, the values of autocorrelation coefficient should be less than $$\pm 2/\sqrt{n}$$ to claim that the data is uncorrelated. $$n= \text{sample size}$$.

• The Ljung-Box test requires that there are no pulses, level shifts ,local time trends , seasonal pulses in the data/residuals. Furthermore it requires that the error variance is constant over time. Better to identify a robust ARIMA model and use this test to validate the model that has been specified. Jul 16 '17 at 10:36