ERPs statistic analysis

:question: If you have a question or issue with MNE-Python, please include the following info:

  • MNE version: latest one
  • operating system: Windows 11

I have two processed epochs that comes from two different experimental design: rest-state and stimulated-state.

Now, I want to compare these two epochs and analyze when the data has a significant correlation.

Best regards
kerwin

I’m not exactly sure what you are trying to do, but you can compute correlations with numpy.corrcoef — NumPy v1.26 Manual, and cross-correlation with numpy.correlate — NumPy v1.26 Manual. These functions take two 1D NumPy arrays, which you can generate from your epochs with epochs.get_data(). You have to pick one channel, and you might have to flatten the resulting 2D array.

ok thank you!I am trying to do cluster permutation test. Do you have any ideas

There’s a very good notebook about data science for neuroscience which has some good tutorials on analysing ERP data.

https://neuraldatascience.io/7-eeg/erp_group_stats.html#permutation-t-test-for-multiple-comparison-correction

I’ve linked you to a chapter that has a section on permutation t-testing. Hopefully you find this useful.

1 Like

wow! Thank you vert much!