Edge effects on cluster-based permutation plots

Hi,

I performed a cluster-based permutation test (with ft_freqstatistics) on maps ranging from -1.5 to 1.5 sec; what I'm interested in is the window 0-0.8 sec. During TF decomposition I chose larger windows specifically to avoid edge effects on the window of interest (0-0.8) at frequencies above 7 Hz.

The problem is when I compute cluster-based permutation testing: using the larger maps (-1.5-1.5) but restricting the analyses to the window of interest (0-0.8) I still get edge effects, as if edge effects are re-computed.

Here's the stat plot on one electrode:

And here's the same electrode with the same stat but on a larger window (-0.2-1; remember that the TF maps fed to the stat are -1.5-1.5 sec):

Edge effects shouldn't be recomputed, right?

Thanks,
Simone

That’s correct: the edge effect estimator is for visualization only and is pertinent only when applied to time-frequency decompositions that include true signal edges. I understand that in your case, you are displaying maps that have been extracted from time-frequency decompositions obtained over longer epochs. Hence there are no true edges in there and the edge mask should not be displayed.
Hope this helps.

Hi Sylvain, thanks for replying.

Exactly, the TF maps have been obtained from larger epochs and on more frequency bands (including those lower than 7 Hz). In fact, if I extract the values from the longer TFs I have no edge effects displayed, just a bit in the lower frequencies, as expected. Since in some contrasts I obtain significant clusters in lower frequencies, I still need to mask the cluster-based permutation test results, hence the use of “hide edge effects”. Is it a bug? Or should I not use the edge effect option in the stat maps?

Thanks again!

Indeed, just do not use edge-effect masking for visualization these extracted portions of TF maps/stats.

Hi Simone,

Sorry for the response delay.
This was indeed a bug: the field TFmask, which indicates where we have properly estimated the power, was not used when calling ft_freqstatistics. I fixed this:

I also added a test so that it does not recompute default edge effects for statistics results.
So you previous stat results should now show no edge effects anymore (unchanged display when you click on "Hide edge effects"), and if your recompute them it should display report the original edge effects present in the file (as when you do a time selection with the process Extract>Extract time).

Thanks for reporting this.
Francois

2 Likes

Hi Francois,

Thanks a lot for the bug fix!

Simone