0
$\begingroup$

I have three time-series of data: A, B, and C. Here is a fictional example of the three, using R code.

TimeSeriesA<-c(1:50,sample(1:50,50,replace=T),1:50,1:50,sample(1:50,50,replace=T))
TimeSeriesB<-c(1:50,sample(1:50,50,replace=T),1:50,sample(1:50,50,replace=T),sample(1:50,50,replace=T))
TimeSeriesC<-c(1:50,sample(1:50,50,replace=T),sample(1:50,50,replace=T),1:50,sample(1:50,50,replace=T))

My belief is that blocks of time where all three series are correlated have one interpretation, where B+A are correlated, but not C have another, where none are correlated has another, and so forth.

For example, in the fictional time-series I have created. From years 1:50, all three time-series are perfectly correlated, pearson's r = 1, but from years 51:100 none are correlated (mean r = ~0). Similarly, from 101:150 A + B are correlated, but not C, etc.

Therefore, I would like to statistically identify the existence and duration of different "blocks" (e.g., periods of 3-way vs. 2-way vs. 0-way correlation of the time-series). Because of the way that I've made the above examples the blocks of time are very obvious, but you can imagine that in in real data the definition of the different blocks of time would be a lot fuzzier.

Can anyone think of way to: 1) Statistically identify different blocks of time (other than manually)? 2) Demonstrate this visually in a graph or plot of some kind?

p.s., I'm not married to this, but for my purposes, I would say that an r > ~0.7 counts as strongly correlated - if that helps at all.

$\endgroup$
0
$\begingroup$

I'm thinking that you should divide each time-series into arbitrary small blocks (smaller than the one you want to identify, but big enough to contain quite alot of data). Then identify which larger block it should be prescribed to by running correlation between each small block.

If correlation(A, B) > 0.7:
   #then add this small block to the larger A-B correlation block until r <= 0.7.
If correlation(A, C) > 0.7:
  #then add the blog to the larger A-C block 

#and so on.
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.