I Is there a better way to calculate time-shifted correlation matrices?

  • I
  • Thread starter Thread starter Frank Einstein
  • Start date Start date
  • Tags Tags
    Matrix Python
Frank Einstein
Messages
166
Reaction score
1
TL;DR Summary
I want to know if there is a better way to obtain the correlation matrix of time-shifted series than just removing observations.
Hello everyone.

I have four thermometers which measure the temperature in four different positions. The data is distributed as a matrix, where each column is a sensor, and each row is a measurement. All measurements are made at exactly the same times, one measurement each hour. I have calculated the correlation matrix between all four positions.

Now I am interested in the calculation of the time-shifted correlation matrix. The only method I can think of is to remove the first n rows of the sensors 1 and 2 and the last n rows of the sensors 3 and 4 to see how the correlation changes.

I was wondering if there is a better way to do this than just removing rows.

Any help is appreciated.

Best regards.
Frank.

PS. I am using Python, so I have just used the function np.cov(Tdata_shifted2) and np.cov(Tdata) to obtain the shifted an non-shifted matrices.
 
Physics news on Phys.org
This stackexchange problem seems to match yours.
Most answers seem to only address calculating autocorrelations of each sensor with itself, not cross-sensor delayed correlations. It looks like you do want those latter. The answer by jboi (Feb 17, 2018 at 22:38) seems to provide those.
 
  • Like
Likes WWGD and Frank Einstein
Thanks for the answer
 
Hi all, I've been a roulette player for more than 10 years (although I took time off here and there) and it's only now that I'm trying to understand the physics of the game. Basically my strategy in roulette is to divide the wheel roughly into two halves (let's call them A and B). My theory is that in roulette there will invariably be variance. In other words, if A comes up 5 times in a row, B will be due to come up soon. However I have been proven wrong many times, and I have seen some...
Thread 'Detail of Diagonalization Lemma'
The following is more or less taken from page 6 of C. Smorynski's "Self-Reference and Modal Logic". (Springer, 1985) (I couldn't get raised brackets to indicate codification (Gödel numbering), so I use a box. The overline is assigning a name. The detail I would like clarification on is in the second step in the last line, where we have an m-overlined, and we substitute the expression for m. Are we saying that the name of a coded term is the same as the coded term? Thanks in advance.
Back
Top