You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use ccf to calculate cross-correlation coefficient between two time-series arrays, but found that only half correlation was given (if I'm using it correctly). Then the maximum coefficient is sensitive to the order of the two input arrays, as the peak correlation coefficient may not be capture in one order.
Code Sample, a copy-pastable example if possible
I have a matrix called "all wav", and I want to calculate the cross-correlation coefficient for two of them. Here are what I got in different order:
Expected Output
Here is what I got directly with numpy.correlate:
Output of import statsmodels.api as sm; sm.show_versions()
I think we can add a keyword option to return the two-sided ccf/ccovf.
When we started this part, then we only looked at causal filters with one-sided correlation (coming from time series analysis in econometrics).
Some of those functions were or are just wrappers around scipy.signal functions that translated those to tsa in econometrics.
Now I can see why it's set up this way.
I wanted to use ccf instead of scipy.signal.correlate because I'm more interested in the normalized coefficient and I don't have to calculate myself :)
Describe the bug
I use ccf to calculate cross-correlation coefficient between two time-series arrays, but found that only half correlation was given (if I'm using it correctly). Then the maximum coefficient is sensitive to the order of the two input arrays, as the peak correlation coefficient may not be capture in one order.
Code Sample, a copy-pastable example if possible
I have a matrix called "all wav", and I want to calculate the cross-correlation coefficient for two of them. Here are what I got in different order:
Expected Output
Here is what I got directly with numpy.correlate:
Output of
import statsmodels.api as sm; sm.show_versions()
statsmodels
Installed: 0.13.5
Required Dependencies
cython: Not installed
numpy: 1.22.4
scipy: 1.9.1
pandas: 1.4.4
dateutil: 2.8.2
patsy: 0.5.3
The text was updated successfully, but these errors were encountered: