ft_freqstatistics between two groups

jan-mathijs schoffelen jan.schoffelen at DONDERS.RU.NL
Fri Nov 5 09:14:37 CET 2010


Hi David,

It seems you are averaging both over time and frequency in
ft_freqstatistics. As far as I know, the standard mean-function is
used for that. If there are NaNs in your TFR, which happens now and
then at the edges of the TFR, you get a NaN in the average.

Cheers,

Jan-Mathijs


On Nov 4, 2010, at 8:24 PM, David Ziegler wrote:

> 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
>
>
> --------------------------------------------------------------------------- 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.
> ---------------------------------------------------------------------------
>

Dr. J.M. (Jan-Mathijs) Schoffelen
Donders Institute for Brain, Cognition and Behaviour,
Centre for Cognitive Neuroimaging,
Radboud University Nijmegen, The Netherlands
J.Schoffelen at donders.ru.nl
Telephone: 0031-24-3614793


---------------------------------------------------------------------------
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/20101105/d878e0f3/attachment-0001.html>


More information about the fieldtrip mailing list