# Plot results of mne.stats.permutation\_cluster\_test

**URL:** <https://mne.discourse.group/t/plot-results-of-mne-stats-permutation-cluster-test/3265>\
**Category:** Support & Discussions\
**Created:** [June 16, 2021, 1:20pm UTC](https://mne.discourse.group/t/plot-results-of-mne-stats-permutation-cluster-test/3265 "2021-06-16T13:20:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bmmansur](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/bmmansur/32/142_2.png) [@bmmansur](https://mne.discourse.group/u/bmmansur)\
**Post date:** [June 16, 2021, 1:20pm UTC](https://mne.discourse.group/t/plot-results-of-mne-stats-permutation-cluster-test/3265/1 "2021-06-16T13:20:48Z")

</div>

- 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.

```python

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

---

<div class="post-metadata">

**Author:** ![britta-wstnr](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/britta-wstnr/32/3538_2.png) [@britta-wstnr](https://mne.discourse.group/u/britta-wstnr)\
**Post date:** [June 29, 2021, 5:14pm UTC](https://mne.discourse.group/t/plot-results-of-mne-stats-permutation-cluster-test/3265/2 "2021-06-29T17:14:25Z")

</div>

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
