ft_freqstatistics between two groups

David Ziegler daz at MIT.EDU
Thu Nov 4 20:24:55 CET 2010


Hi Fieldtrippers,

I am trying to run a comparison between TFRs from two groups of subjects
and I keep getting some errors that I can't track down answers for.  I
seem to recall something like this being discussed on this list, but I
can't for the life of me track down that thread at the moment.

I am using data from a neuromag 306 system on which I have calculated
TFRs on the gradiometer data, then ran ft_combineplanar, followed by
ft_freqdescriptives, followed by ft_freqgrandaverage for each of the two
groups with the cfg.keepindividual = 'yes' option.  I am able to plot
the grand averages just fine, so the data seem to be ok (and there are
fairly striking differences between the two).

When I run a permutation test to quantify the group differences, I get
the following error messages (although the analysis does run):

/computing statistic 500 from 500
Warning: Not all replications are used for the computation of the statistic.
 > > In statfun_indepsamplesT at 57
   In statistics_montecarlo at 298
   In fieldtrip-20100617/private/statistics_wrapper at 285
   In ft_freqstatistics at 105
Warning: Divide by zero./

When I inspect the output file, the .stat contains a single column of
NaNs.  Does anyone know what I am doing wrong here?

Here is the actual code I am using to run the statistics:

cfg = [];
cfg.channel          = {'MEG *3'}; %only combined gradiometer data
cfg.layout = 'neuromag306cmb_dz.lay';
cfg.latency     = [0.2 0.8];
cfg.avgovertime = 'yes';
cfg.avgoverchan      = 'no';
cfg.avgoverfreq      = 'yes';
cfg.parameter   = 'powspctrm';
cfg.frequency        = [14 26];
cfg.method           = 'montecarlo';
cfg.statistic        = 'indepsamplesT';
cfg.correctm         = 'no';
cfg.clusteralpha     = 0.05;
cfg.clusterstatistic = 'maxsum';
cfg.minnbchan        = 2;
cfg.tail             = 0;
cfg.clustertail      = 0;
cfg.alpha            = 0.05;
cfg.numrandomization = 500;

cfg.design           = [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
20 21 22 23 24 25 ;   % subject number
                                     1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2
2 2 2 2 2 2 2]; % 12subjs in grp1, 13subjs in grp2
cfg.uvar = 1;
cfg.ivar = 2;

GA_low_stat = ft_freqstatistics(cfg, GA_grp1_low, GA_grp2_low)

Thanks,
David


--

David A. Ziegler

Department of Brain and Cognitive Sciences
Massachusetts Institute of Technology
43 Vassar St,46-5121
Cambridge, MA 02139

Tel: 617-258-0765

Fax: 617-253-1504

daz at mit.edu <mailto:daz at mit.edu>


---------------------------------------------------------------------------
You are receiving this message because you are subscribed to
the  FieldTrip list. 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.
See also http://listserv.surfnet.nl/archives/fieldtrip.html
and http://www.ru.nl/neuroimaging/fieldtrip.
---------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20101104/63dde3c4/attachment-0003.html>


More information about the fieldtrip mailing list