I have calculated autocorrelation on time series data on the patterns of movement of a fish based on its positions:

X(`x.ts`

) andY(`y.ts`

).By using R, I ran the following functions and produced the following plots:

`acf(x.ts,100)`

`acf(y.ts,100)`

My question is, how do I interpret these plots? What information is needed to report any sort of pattern? I have been surfing the internet and have yet to find a concise way that effectively explains it.

Also, how do you decide the correct amount of lag to use? I used 100, but I am not sure if that is too much.

**Answer**

Those plots are showing you the $\textit{correlation of the series with itself, lagged by x time units}$. So imagine taking your time series of length $T$, copying it, and deleting the first observation of copy#1 and the last observation of copy#2. Now you have two series of length $T-1$ for which you calculate a correlation coefficient. This is the value of of the vertical axis at $x=1$ in your plots. It represents the correlation of the series lagged by one time unit. You go on and do this for all possible time lags $x$ and this defines the plot.

The answer to your question of what is needed to report a pattern is dependent on what pattern you would like to report. But quantitatively speaking, you have exactly what I just described: the correlation coefficient at different lags of the series. You can extract these numerical values by issuing the command

`acf(x.ts,100)$acf`

.

In terms of what lag to use, this is again a matter of context. It is often the case that there will be specific lags of interest. Say, for example, you may believe the fish species migrates to and from an area every ~30 days. This may lead you to hypothesize a correlation in the time series at lags of 30. In this case, you would have support for your hypothesis.

**Attribution***Source : Link , Question Author : Matt , Answer Author : gregory_britten*