What is PCA doing with autocorrelated data?

Just because some correspondent posed an interesting question concerning methods of computation of autocorrelation, I began to play with it, nearly without any knowledge about time series and autocorrelation.

The correspondent arranged his data ($32$ data points of a time series) shifted by one time lag each besides so that he had a matrix of $32\times32$ data (as I understood him) where the first row are the original data, the second row the data shifted by $1$ time unit, the next row by another one and so on. I realized this additionally by glueing the end to the tail, so making "circular" datasets.

Then, just for looking what might come out of it, I computed the correlation matrix and from this the principal components. Surprisingly I got the image of a frequency-decomposition, and (again with other data) one frequency, say that with one period in the $32$ data was in the first principal component, and that with four periods was in the second PC and so on (I got $6$ "relevant" PC's with eigenvalue $>1$). First I thought this depends on the input data, but now I assume it is systematically this way by the special construction of the data set with its circular shifts (also known as "Toeplitz" matrix). Rotations of the PC-solution to varimax or other rotation-criteria gave slightly different, and possibly interesting, results, but in general seem to provide such a frequency-decomposition.

Here is a link to pictures which I've made from the $32$-point data set; the curves are simply made from the loadings of the factormatrix: one curve the loadings on one factor. The curve of the first PC1 should show the highest amplitudes (roughly because it bears the highest sum of loadingssquares)

Questions:

• Q1: Is this a feature by design? (of PCA with this type of dataset)
• Q2: Is this approach indeed somehow usable for a serious approach to frequency-/wavelength analysis?

[update] here is the dataset (hope it shall come out being copyable for you)

-5,-3,-1,0,2,4,6,5,3,1,1,0,-2,-3,-1,0,3,5,7,6,7,5,4,3,2,3,5,4,3,2,3,4
-3,-1,0,2,4,6,5,3,1,1,0,-2,-3,-1,0,3,5,7,6,7,5,4,3,2,3,5,4,3,2,3,4,-5
-1,0,2,4,6,5,3,1,1,0,-2,-3,-1,0,3,5,7,6,7,5,4,3,2,3,5,4,3,2,3,4,-5,-3
0,2,4,6,5,3,1,1,0,-2,-3,-1,0,3,5,7,6,7,5,4,3,2,3,5,4,3,2,3,4,-5,-3,-1
2,4,6,5,3,1,1,0,-2,-3,-1,0,3,5,7,6,7,5,4,3,2,3,5,4,3,2,3,4,-5,-3,-1,0
4,6,5,3,1,1,0,-2,-3,-1,0,3,5,7,6,7,5,4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5,4,3,2,3,4,-5,-3,-1,0,2,4,6,5,3,1,1,0,-2,-3,-1,0,3,5,7,6
5,4,3,2,3,5,4,3,2,3,4,-5,-3,-1,0,2,4,6,5,3,1,1,0,-2,-3,-1,0,3,5,7,6,7
4,3,2,3,5,4,3,2,3,4,-5,-3,-1,0,2,4,6,5,3,1,1,0,-2,-3,-1,0,3,5,7,6,7,5
3,2,3,5,4,3,2,3,4,-5,-3,-1,0,2,4,6,5,3,1,1,0,-2,-3,-1,0,3,5,7,6,7,5,4
2,3,5,4,3,2,3,4,-5,-3,-1,0,2,4,6,5,3,1,1,0,-2,-3,-1,0,3,5,7,6,7,5,4,3
3,5,4,3,2,3,4,-5,-3,-1,0,2,4,6,5,3,1,1,0,-2,-3,-1,0,3,5,7,6,7,5,4,3,2
5,4,3,2,3,4,-5,-3,-1,0,2,4,6,5,3,1,1,0,-2,-3,-1,0,3,5,7,6,7,5,4,3,2,3
4,3,2,3,4,-5,-3,-1,0,2,4,6,5,3,1,1,0,-2,-3,-1,0,3,5,7,6,7,5,4,3,2,3,5
3,2,3,4,-5,-3,-1,0,2,4,6,5,3,1,1,0,-2,-3,-1,0,3,5,7,6,7,5,4,3,2,3,5,4
2,3,4,-5,-3,-1,0,2,4,6,5,3,1,1,0,-2,-3,-1,0,3,5,7,6,7,5,4,3,2,3,5,4,3
3,4,-5,-3,-1,0,2,4,6,5,3,1,1,0,-2,-3,-1,0,3,5,7,6,7,5,4,3,2,3,5,4,3,2
4,-5,-3,-1,0,2,4,6,5,3,1,1,0,-2,-3,-1,0,3,5,7,6,7,5,4,3,2,3,5,4,3,2,3

• Thanks @amoeba and for the lot of editing. I'd only seen two errors which I wanted to edit later, the question looks much nicer now! Commented Nov 11, 2014 at 16:44

Let me convert my earlier comment to an answer.

Do you imagine rows in your data matrix to be the variables or the samples? I will assume they are samples: i.e. you have $n=32$ different time series (samples).

Then, if all $n=32$ rows are identical, but only circularly shifted by $1$ position each, then the $n\times n$ Gram matrix of your data consisting of dot products between all pairs of rows will have Toeplitz structure: high values close to the diagonal and gradually decreasing to zero values away from it. Toeplitz matrices have consecutive Fourier modes as their eigenvectors (and eigenvectors of the Gram matrix are principal components, up to the scaling), so yes to your Q1: it is no surprise that you get sinusoidal waves of increasing frequencies as PCs.

No idea if it can be useful (Q2). In my experience, it tends to appear as an annoying artifact. I.e. people have some data, get something resembling Fourier modes out of PCA and start wondering what they could mean, whereas they are simply due to some time shifts in the original time series.

• Well, very nice, thanks! Yes, I've thought the data along the rows. Q2 comes also because I've never understood up to today how exactly Fourier analysis works - and by accident this could have been one step into to get some intuition about (but this vague hope really seem to be fruitless here ...) Commented Dec 4, 2014 at 0:34
• By the way, would you mind sharing your 32-valued time-series? I would like to insert a figure showing the Gram matrix, and I could do it directly with your data. Commented Dec 4, 2014 at 10:02
• Did you see the link in my question? It redirects to a webpage which I made using exce.l It has 4 or 5 subpages, which are selectable by "firefox" in my installation by a clik on the tab-bar at the bottom of the screen. The first subpage shows the list of data. However vertically: one should take it as first row in a new table and add 31 rows while cycling to the right. If that's inconvenient I can also add the data into my question... Commented Dec 4, 2014 at 10:21
• Oh wow, I did not realize it was a whole online spreadsheet, and not just a screenshot! Thanks. Commented Dec 4, 2014 at 10:24
• A something similar holds even when the time series is random Brownian noise, in which case the PCA in the limit of many observations recovers the Karhunen-Loeve synosidal basis functions en.wikipedia.org/wiki/Kosambi–Karhunen–Loève_theorem#The_Wiener_process and similar for other autocorrelated processes. Commented Jan 29 at 17:37