# freqdescriptives/statistics (spatial clustering for planar gradiometers and magnetometers __ Neuromag)

Eric Maris e.maris at DONDERS.RU.NL
Wed Sep 2 09:47:33 CEST 2009

```Hi Dahlia,

My name is Eric Maris and, together with Robert Oostenveld, I implemented
the permutation statistics in Fieldtrip.

> 1. We're using Neuromag (Vectorview 306) data, and giving the appropriate
> layout file (all channels). Does fieldtrip take into account which
channels
> are gradiometers and which magnetometers when it calculates adjacency for
> clustering?
>
> 2. How does fieldtrip calculate adjacency for channels? (time and
frequency
> are obvious...)
>
> 3. How is the clustering performed?
>
> We're getting a significant cluster but it doesn't look like a single blob
> in the time-frequency domain (averaging over sensors) but like two very
> distant blobs, which is very strange...

These are important points. As far as I know, you are the first to use the
cluster-based permutation tests on Neuromag data. This means that you have
to do some more work than the people who work with a system that only has
axial gradiometers (like the CTF system). For axial gradiometers, Fieldtrip
can calculate the adjacency in a straightforward way, using the positions of
the coils in the helmet. Working with planar gradiometers and magnetometers,
you have to define yourself the adjacency structure for the channels in your
system (both gradiometers and magnetomers). Fieldtrip doesn't care about the
way you define adjacency. You can give Fieldtrip any adjacency structure via
the configuration field cfg.neighbours. (Type "help neighbourselection" to
get info about how to define and adjacency structure.)

Defining adjacency on planar gradiometers requires some thinking. Things
become easier if you (1) ignore the magnetometers, and (2) sum the power at
the pairs of orthogonal planar gradiometers. This maps the data on a new set
of channels for which adjacency is defined in a straightforward way. (Of
course, you may also decide to retain the orientation information in your
original planar gradiometers, but than you have to come up with a sensible
definition of adjacency that takes this orientation information into
account.)

Finally, a minor point, do not start with cluster-based permutation tests
with both time and frequency resolution. If you are interested in
oscillations, only keep the frequency resolution in you first analyses. You
can later add the time axis if you want to know how the effect develops over
time.

Good luck,

Eric

dr. Eric Maris
Donders Institute for Brain, Cognition and Behavior
Center for Cognition and F.C. Donders Center for Cognitive Neuroimaging
P.O. Box 9104
6500 HE Nijmegen
The Netherlands
T:+31 24 3612651
Mobile: 06 39584581
F:+31 24 3616066
E: e.maris at donders.ru.nl

MSc Cognitive Neuroscience: www.ru.nl/master/cns/

>
> On Tue, 1 Sep 2009 09:09:53 +0000, Jan-Mathijs Schoffelen
> <j.schoffelen at PSY.GLA.AC.UK> wrote:
>
> >Dear Dahlia,
> >
> >Hemant Bokil indeed uses the jackknife to obtain variance estimates of
> >power (and coherence), see also for example his 2007 paper in
> >J.Neurosci.Methods. More specifically, if your data is 'well-behaved',
> >he has shown that by applying a specific correction to the power
> >estimate, in combination of the jackknife, generates a test-statistic
> >from a differential (i.e. contrast) power spectrum which has a
> >standard normal distribution (i.e. the jackknife estimate of the
> >variance is expected to be 1 and the estimate of the mean 0).
> >Unfortunately, MEG data is hardly ever well-behaved, so we prefer to
> >use non-parametric techniques to do statistical inference.
> >Freqdescriptives in this respect still historically has the option of
> >computing a jackknife estimate of the SEM of the powerspectrum/
> >coherencespectrum, which can be used to compute a T-statistic across
> >two conditions for example. However, I you would choose this path, you
> >have to write some code which does this, because it is not in
> >fieldtrip. The biascorrect option has been taken out altogether as far
> >as I can see, (and had been designed only to correct the bias in the
> >coherence spectra, and not in the power spectra if I remember
> >correctly), and any reference in the documentation should be removed.
> >Unfortunately, we did not yet have time to considerably clean up
> >freqdescriptives, but this is quite high on the developer's to do list.
> >The bottom line is: ignore biascorrect, and if you use the jackknife
> >estimate of the SEM, you have to come up with some code of your own.
> >Alternatively, you could look into freqstatistics and use
> >cfg.statistic = 'indepsamplesT' / 'depsamplesT' if you want to do
> >statistical inference.
> >
> >Best,
> >
> >Jan-Mathijs
> >
> >
> >On 28 Aug 2009, at 06:34, Dahlia Sharon wrote:
> >
> >> Hi all,
> >>
> >> Is there a more detailed explanation of usage for the jackknife and
> >> biascorrect options for freqdescriptives than the one in the
> >> freqdescriptives reference
> page(http://fieldtrip.fcdonders.nl/reference/freqdescriptives)?
> >>
> >> More specifically, are these options related to Bokil et al NeuroIm
> >> 2007? How should they be employed to determine significance of
> >> difference between conditions? (Is there somewhere a tutorial for
> >> the use of these options analogous to the one about cluster-based
> >> permutation testing?)
> >>
> >> Also, for the permutation analysis of TFRs
> (http://fieldtrip.fcdonders.nl/tutorial/statistics?s
> >> []=freqstatistics), if I don't want to employ the planar gradient
> >> step (what exactly IS combineplanar? sorry I couldn't find it), can
> >> I simply skip it and calculate the TFRs of the raw sensor data?
> >>
> >> Many thanks!
> >> Dahlia.
> >> ----------------------------------
> >> The aim of this list is to facilitate the discussion between users
> >> of the FieldTrip toolbox, to share experiences and to discuss new
> >> ideas for MEG and EEG analysis.
> >> http://listserv.surfnet.nl/archives/fieldtrip.html
> >> http://www.ru.nl/fcdonders/fieldtrip/
> >
> >----------------------------------
> >
> >The aim of this list is to facilitate the discussion between users of
> >the FieldTrip toolbox, to share experiences and to discuss new ideas
> >for MEG and EEG analysis.
> >
> >http://listserv.surfnet.nl/archives/fieldtrip.html
> >
> >http://www.ru.nl/fcdonders/fieldtrip/
> >
> >
> >
> >
> >
> >----------------------------------
> >The aim of this list is to facilitate the discussion between users of the
> FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG
> http://listserv.surfnet.nl/archives/fieldtrip.html and
> http://www.ru.nl/neuroimaging/fieldtrip.
> >
>
> ----------------------------------
> The aim of this list is to facilitate the discussion between users of the
FieldTrip
> toolbox, to share experiences and to discuss new ideas for MEG and EEG
analysis.