# cluster permutation t tests question

**URL:** <https://mne.discourse.group/t/cluster-permutation-t-tests-question/2147>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [April 8, 2020, 11:19am UTC](https://mne.discourse.group/t/cluster-permutation-t-tests-question/2147 "2020-04-08T11:19:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [April 8, 2020, 11:19am UTC](https://mne.discourse.group/t/cluster-permutation-t-tests-question/2147/1 "2020-04-08T11:19:38Z")

</div>

External Email - Use Caution

Hello,

I have a question regarding cluster permutation t tests.

I want to make a 1 sample t-test between 2 conditions, comparing Power Spectral Densities averaged over epochs and frequencies, defined at each source. Hence the clustering would only be spatial, not spatio-temporal.

Do I need to use spatio\_temporal\_cluster\_1samp\_test and give it as argument an array of shape (n\_subjects, n\_vertices) and made of contrasted PSD values?

Thanks in advance,

Fleur

-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20200408/1641ada6/attachment-0001.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200408/1641ada6/attachment-0001.html)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [April 8, 2020, 2:23pm UTC](https://mne.discourse.group/t/cluster-permutation-t-tests-question/2147/2 "2020-04-08T14:23:10Z")

</div>

External Email - Use Caution

The easiest way to do it is just to make the time dimension a singleton  
with something like X[:, np.newaxis, :].

Eric

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [April 8, 2020, 3:02pm UTC](https://mne.discourse.group/t/cluster-permutation-t-tests-question/2147/3 "2020-04-08T15:02:43Z")

</div>

External Email - Use Caution

Thank you! Would it render the same result as using permutation\_cluster\_1samp\_test?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [April 8, 2020, 3:13pm UTC](https://mne.discourse.group/t/cluster-permutation-t-tests-question/2147/4 "2020-04-08T15:13:27Z")

</div>

External Email - Use Caution

I think it should, yeah.

Eric
