Within-subject coherence statististics for virtual sources

Jan Mathijs Schoffelen Jan.Schoffelen at FCDONDERS.RU.NL
Tue Oct 24 15:31:57 CEST 2006

Dear Lorina,

For the time being, I assume that you have your data imported into a
fieldtrip-like format, using besa2fieldtrip. I am not familiar with this
function, but when I read the help of besa2fieldtrip I guess that your besa
file was a .tfc file. So probably your data-object looks like what fieldtrip
considers to be a frequency-structure, containing a TFR for each ROI. I
guess you have two data-objects for each subject.

What you would like to do is possible within fieldtrip, but I would advise
you not to use clusterrandanalysis to get there. Quite some correspondence
has been devoted to the new statistical interface, you can read about it on
the discussion list's website (follow the appropriate links on the fieldtrip
website), concerning Re:
clusterrandanalysis on scalar values + problem with topoplotER during the
past month, but which started in August.

In a nutshell: instead of using clusterrandanalysis you could use
freqstatistics (under the above assumption that your data resembles a
fieldtrip-frequency structure) with the appropriate settings to get your
statistics done. Freqstatistics relies on statistics_montecarlo, when you
specify cfg.method = 'montecarlo'.

Please have a try following the thread on the discussion list, and the
following configuration settings, as well as the information in
statistics_montecarlo and other dependent functions. You'll probably need
the attached function as well, which computes your statistic of interest.

Cfg = [];

Cfg.method = 'montecarlo';

Cfg.statistic = 'diff';

Cfg.parameter = 'cohspctrm'; %This is at least what I expect your data
objects to contain!

Cfg.numrandomization = a number;

Cfg.design = [1 1 2 2 3 3 with all the numbers in between 14 14; .

                     1 2 1 2 1 2 with all the numbers in between 1 2]; %this
specifies how the data has to be interpreted

Cfg.ivar = 2; %row-index of independent variable, which is the condition in
your case

Cfg.uvar = 1; %row-index of the 'unit'-variable, your unit of observation,
which are your individual subjects.

   %the design-matrix will be shuffled, by swapping the 1 and 2's in the
ivar-row, while keeping the uvar-doublets together.

Cfg.correctm = 'yes'; %keep it at this for the time being, we have to
develop a cunning strategy to incorporate something about the neighbourhood
structure of your ROIs

  %as soon as you get your script running, you can try to incorporate fancy
multiple-comparison correction strategies, such as clustering in time and

Stat = freqstatistics(cfg, subj1cond1, subj1cond2, subj2cond1, subj2cond2
..); %take care that this corresponds with how you specified your design.

Subjxconx should then be the data-structure containing your TFRs in a field
called cohspctrm.

I hope this puts you on track,




From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL] On Behalf
Of Lorina Naci
Sent: Monday, October 23, 2006 7:18 PM
Subject: [FIELDTRIP] Within-subject coherence statististics for virtual

Dear FIELDTRIP members,

I have used BESA to perform source coherence

calculations for a multiple-subject/multiple-condition experiment. I have 14
subjects, and 2 conditions for which I'd like to compare coherence values. I
have calculated coherence values in the Time-Frequency domain for each

Given that BESA cannot calculate statistics in a multiple-subject study,
their support personnel directed me towards FieldTrip.

I would like to use your existing script 'clusterrandanalysis on TFRs of
power that were computed with BESA,' but I cannot relate this to my data as
the coherence values have been calculated for ROI sources, (8 per hemisphere
- 16 sources total), and not for electrodes (I had 128).

Do you have any advice regarding how I may adopt the script to for source
coherence as opposed to electrode coherence? How do I import the source

Many thanks is advance for your help,


 Send instant messages to your online friends http://uk.messenger.yahoo.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20061024/6bd4d995/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: statfun_diff.m
Type: application/octet-stream
Size: 990 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20061024/6bd4d995/attachment-0002.obj>

More information about the fieldtrip mailing list