[FieldTrip] ft_freqstatistics error

Jutras, Mike mjutras at emory.edu
Thu Jul 21 22:00:42 CEST 2011


Hello,

I'm receiving an error after attempting to run the new version ft_freqstatistics (fieldtrip-20110606). I'm attempting to run a cluster-based permutation test for two sets of time-frequency data. These data consist of 114 LFP recordings, 2 conditions. I'm not sure if I am arranging the data correctly or using the correct design, but here is what it looks like:

% data variable 1
cnd1_1 =
        label: {'AD01'}
         freq: [1x15 double]
         time: [1x126 double]
       dimord: 'subj_chan_freq_time'
    powspctrm: [4-D double]
          cfg: [1x1 struct]

>> size(cnd1_1.powspctrm)
ans =
   114     1    15   126

% data variable 2
cnd2_1 =
        label: {'AD01'}
         freq: [1x15 double]
         time: [1x126 double]
       dimord: 'subj_chan_freq_time'
    powspctrm: [4-D double]
          cfg: [1x1 struct]

>> size(cnd2_1.powspctrm)
ans =
   114     1    15   126

% code for permutation test cfg
cfg = [];
cfg.channel      = 'AD01';
cfg.avgoverchan  =  'no';
cfg.avgoverfreq  =  'no';
cfg.avgovertime =  'no';

cfg.latency      =  'all';
cfg.frequency    =  'all';
%cfg.frequency    =  'all';
cfg.parameter    =  'powspctrm';
cfg.method       =  'montecarlo';
cfg.statistic    =  'depsamplesT';

dum = ones(1, size(cnd1_1.powspctrm,1));
cfg.design       =  [dum 2.*dum; 1:size(cnd1_1.powspctrm,1) 1:size(cnd1_1.powspctrm,1)];
cfg.numrandomization  = 1000;
cfg.correctm     =  'cluster';
cfg.alpha        =  0.05;
cfg.tail         =  0;
cfg.ivar         =  1;
cfg.uvar         =  2;
cfg.feedback     =  'text';
cfg.clusterstatistic  = 'maxsum';
cfg.clusterthreshold  = 'parametric';
%cfg.clusterthreshold  = 'nonparametric_common';
cfg.clusteralpha =  0.05;
% clustercritval original value: 1.96
cfg.clustercritval    = 1.96;
cfg.clustertail  =  0;
cfg.neighbours{1}.label = 'AD01';
cfg.neighbours{1}.neighblabel = {};


>> stat=ft_freqstatistics(cfg, cnd1_1, cnd2_1);
computing statistic over the frequency range [2.058 29.950]
computing statistic over the time range [-1.000 0.250]
selection powspctrm along dimension 2
selection powspctrm along dimension 3
selection powspctrm along dimension 4
selection powspctrm along dimension 2
selection powspctrm along dimension 3
selection powspctrm along dimension 4
??? Error using ==> ft_freqstatistics at 248
the number of observations in the design does not match the number of observations in the data

Thanks for any advice,
Michael
--
Michael Jutras, Ph.D.
Postdoctoral fellow
Emory University, Yerkes National Primate Research Center
404-712-9435




________________________________

This e-mail message (including any attachments) is for the sole use of
the intended recipient(s) and may contain confidential and privileged
information. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this message (including any attachments) is strictly
prohibited.

If you have received this message in error, please contact
the sender by reply e-mail message and destroy all copies of the
original message (including attachments).




More information about the fieldtrip mailing list