Defining a minimum number of channels in a cluster for clustered permutation test

  • MNE version: 0.24.1
  • operating system: Windows 10

Hi all,

I am doing some work on EEG data, and in a paper I am referencing they define a minimum number of channels/sensors needed to be counted as a cluster (They use Matlab). Is there a way to define this when using the mne.stats.permutation_cluster_test function?

1 Like

Hello @s204098 and welcome to the forum!

To my knowledge, there is currently no built-in way to achieve what you’re asking for. In theory, it should be possible to perform a post-hoc selection of suitable clusters from the list of clusters returned by the cluster permutation functions (e.g., for each row of that array, check if any cell with a True value has at least one immediate True neighbor in the same row), but I’m afraid this isn’t really trivial. Maybe @larsoner or @sappelhoff have some code snippets somewhere to do this job…?

Best wishes,

1 Like

We discuss this feature in this thread: [ENH] Spatio-temporal cluster permutation testing: Define minimum "nodes" to define a cluster · Issue #10604 · mne-tools/mne-python · GitHub

We have basically agreed on an API, but we need a volunteer to implement it :wink:

1 Like

Thanks for the detailed responses!
The results seem good enough for my use-case by doing the post-hoc filtering when needed:)