[FieldTrip] Running cluster-based permutation test on fMRI data
Eelke Spaak
e.spaak at donders.ru.nl
Wed Jul 17 10:49:34 CEST 2019
Dear Lene,
FieldTrip's neighbours structures do not care about the spatial
properties of the 'channels' involved; they simply define which
'channels' should be considered neighbours of which (other)
'channels'. These (label-based) neighbours structures are converted
internally into a 2D matrix of channel-by-channel, indicating the same
(1 - connected; 0 - not connected). This is the
'spatdimneighbstructmat' input to findcluster. From this, it's
hopefully clear that this matrix should indeed always be 2D,
irrespective of whether the original 'channel' space of the data is
2D, 3D, or whatever.
The problem in this case is probably in how you are defining the
custom neighbours structure that you are feeding into
ft_timelockstatistics. If you fix that, it should work.
Note that the whole reason for the (somewhat involved)
neighbours-machinery that FieldTrip uses for doing the clustering is
that the channel dimension in EEG/MEG data is in general *not* regular
(as opposed to e.g. the time and frequency dimensions). When you're
dealing with volumetric data, I'd bet the spatial dimensions in your
data *are* regular, e.g. voxel (3,3,3) has a fixed set of neighbours
(3,3,2), (3,3,4), (3,2,3), etc.. Clustering across only regular
dimensions is potentially a lot faster than using the irregular
neighbours definition. If the ft_timelockstatistics approach you're
using now ends up taking too much time, you could consider casting
your data as volume structures instead, and using ft_sourcestatistics,
which does not use arbitrary neighbourhood to cluster but only
supports regular dimensions. But as a first step, try to fix your
neighbours, that might be easier.
Cheers,
Eelke
On Wed, 17 Jul 2019 at 09:53, Lene Schmidt <lene.schmidt at gmx.at> wrote:
>
> Dear community,
>
> I would like to run a cluster-based permutation test on fMRI data. I organized my data as one would do running ft_timelockstatistics on EEG data. The only difference is that I provide a neighbours structure referencing a three-dimensional layout. When running ft_timelockstatistics, I get an error in the findcluster function (line 56) which seems to check whether the layout is two-dimensional (which it is not).
>
> Does anyone know if rewriting the findcluster function will suffice to successfully run a cluster test or if there will be more errors in other functions? Has anyone else found a good workaround for this problem?
>
> Any help is greatly appreciated.
>
> Best,
> Lene
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> https://doi.org/10.1371/journal.pcbi.1002202
_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
https://doi.org/10.1371/journal.pcbi.1002202
More information about the fieldtrip
mailing list