grinsted / wavelet-coherence

A cross wavelet and wavelet coherence toolbox for MATLAB
Other
137 stars 58 forks source link

Rsq sometimes less than 0 or greater than 1 #5

Open cmicek1 opened 3 months ago

cmicek1 commented 3 months ago

It's actually been a year since I used your package, but am working with the vectorwavelet package in R calculating the coherence between some EEG data, and realized that sometimes the values for Rsquared that are returned are not between 0 and 1 (though they usually are). Digging through code from when I was using you package last year I realized I came across the same issue then looking at a different set of data. Do you have an idea why this might be? The fact that this happens in multiple packages seems to suggest this isn't a mathematical impossibility, but I've been intuiting about coherence values similarly to correlation coefficients, so I'm not sure what to make of this when it occurs. Should I just throw these values away? Or are they actually meaningful?