mne-tools / mne-python

MNE: Magnetoencephalography (MEG) and Electroencephalography (EEG) in Python
https://mne.tools
BSD 3-Clause "New" or "Revised" License
2.67k stars 1.31k forks source link

low t-values affecting cluster based statistics #6775

Closed vassiki closed 2 years ago

vassiki commented 5 years ago

I'm using the function permutation_cluster_1samp_test from the cluster_level module in mne.stats. The output of stat_fun shows extraordinarily low t-values, which are all from nodes in the medial wall. I have provided a boolean array to the exclude argument of the function to list the nodes to exclude. The only clusters I am ending up with in my final results are those adjacent to the medial wall with negative t-values. Is there a way to deal with this issue without defaulting to the use of a one-tailed test?

I'm using the mne version '0.17.2' and here is the code for the function call:

tfce = False
chance=0.1
nproc=1
n_permutations=10000
n_subjects = 16
threshold = dict(start=0, step=0.1) if tfce else \
    -stats.distributions.t.ppf(0.05, n_subjects - 1)
# run it

stat = permutation_cluster_1samp_test(
    data.samples - chance,
    threshold=threshold,
    tail=0,
    stat_fun=ttest_1samp_no_p,  
    n_jobs=nproc,
    n_permutations=n_permutations,
    out_type='indices',
    connectivity=c,
    exclude=vals_inv[0],
    seed=423
)

The boolean array given as an input to exclude was obtained from a medial wall mask, and the sparse connectivity matrix c was calculated from a gifti file.

larsoner commented 4 years ago

@vassiki by "low" do you mean close to zero, or negative? For close to zero you can start your threshold above zero somewhere, it might help.

Otherwise it might be useful to figure out why the medial vertices are so strongly activated for your data

larsoner commented 2 years ago

Closing due to non-repsonse, would probable be better as a discourse question nowadays, too