jeudi 15 septembre 2016

Create a permutation with same autocorrelation

My question is similar to this one, but with the difference that I need an array of zeros and ones as output. I have an original time series of zeroes and ones with high autocorrelation (i.e., the ones are clustered). For some significance-testing I need to create random arrays with the same number of zeroes and ones. I.e. permutations of the original array, however, also the autocorrelation should stay the same/similar to the original so a simple np.permutation does not help me.

Since I'm doing multiple realizations I would need a solution which is as fast as possible. Any help is much appreciated.




Aucun commentaire:

Enregistrer un commentaire