Plot results of mne.stats.permutation_cluster_test

  • MNE-Python version: 0.22.0
  • operating system: Ubuntu 20.04.2 LTS

Dear MNE community,

I’ve performed a mne.stats.permutation_cluster_test comparing time-frequency data of two groups, each with 33 subjects.


T_obs, clusters, cluster_p_values, H0 = mne.stats.permutation_cluster_test(X,
                                                                           n_permutations=1024, 
                                                                           tail=0, 
                                                                           adjacency=None, 
                                                                           n_jobs=2,
                                                                           seed=2, 
                                                                           out_type='indices', verbose=None)

The test results shown in ‘clusters_p_values’ indicate that I have one significant cluster.

Now I want to plot its results and I don’t really know how to do this and which method suits better my needs. I wanted to either plot the results as a topoplot, where the significant clusters get highlighted, or maybe plotting a time-frequency plot for every electrode, highlighting again the significant clusters.

Do you know how to perform it or even know a better way to depict results of a permutation test?

I would really appreciate any help.

Best,

Bruno

Hi Bruno,

what way of plotting suits your needs best is a question of what message you want to convey, I guess.

Regarding the topo-plot: can I ask what kind of input X is? If it is an array, the clustering algorithm might have no (correct) knowledge about the true adjacency structure of your channels (which channels neighbour which and can therefore form a cluster).

Also note that most people would not like to speak of a “significant cluster”, as the outcome of the test (H0 rejected or not) does not speak to specific clusters but only the overall hypothesis, i.e. the data in your conditions either come from the same distribution or not.
You can read more about this in:
Sassenhagen, J., and Draschkow, D. (2019). Cluster-based permutation tests of MEG/EEG data do not establish significance of effect latency or location. Psychophysiology 56 , e13335.

Hope this helps,
Britta

1 Like