- MNE version: 1.4.2
- operating system: Arch Linux, Linux 6.0.11-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 02 Dec 2022 17:25:31 +0000 x86_64 GNU/Linux
Dear MNE-experts,
I noticed one strange thing which may be a bug, so I’d like to share it.
I was performing spatio-temporal permutation cluster test with TFCE to find two clusters with negative values (which I have already observed without TFCE, with fixed threshold, see the picture).
My code for that was:
T_obs, clusters, cluster_p_values, H0 = clu =
spatio_temporal_cluster_1samp_test(X,
adjacency=adjacency,
n_jobs=None,
tail=-1
threshold=t_threshold,
buffer_size=None,
n_permutations=1024,
verbose=True)
I noticed that using TFCE gives very strange results, not even close to what I had without TFCE. Here’s an example.
My code for this was:
threshold_tfce = dict(start=0, step=-0.2)
T_obs_tfce, clusters, p_values, H0 = clu =
spatio_temporal_cluster_1samp_test(X,
n_jobs=None,
threshold=threshold_tfce,
adjacency=adjacency,
buffer_size=None,
tail=-1,
n_permutations=1024)
This however was observed only when I was looking for negative clusters: so when I multiplied my data by -1, and thus tried to find clusters with positive values, everything became fine and close to what I had before, with fixed threshold.
My code for this was:
threshold_tfce = dict(start=0, step=0.2)
T_obs_tfce, clusters, p_values, H0 = clu =
spatio_temporal_cluster_1samp_test(X*(-1),
n_jobs=None,
threshold=threshold_tfce,
adjacency=adjacency,
buffer_size=None,
tail=1,
n_permutations=1024)
I also checked that indeed outputs from spatio_temporal_cluster_1samp_test function are very strange for negative (but not positive) clusters: about a half of all clusters are significant.
Thanks for any comments!