[FieldTrip] TFR Cluster permutation on Single-sensor

Tahereh Toosi tahere.toosi at gmail.com
Sat Jun 6 08:13:37 CEST 2015


Thanks Tzvetan for clarification on question 2. I am still dealing with
issue 1 ( although I set cfg.frequency = 'all' for stats, but it always
returns results for only ~1-10Hz instead of 1:15 Hz which I have in my freq
data (to be precise it returns : stat.cfg.frequency =[0.9995    9.9951]).,
However, if I set a smaller higher bound freq, like cfg.frequency = [1 8],
it works fine )
Anybody has a clue why?

On Fri, Jun 5, 2015 at 10:11 PM, Tzvetan Popov <
tzvetan.popov at uni-konstanz.de> wrote:

> Hi Tahereh,
> Re: first- this shouldn’t happen unless you have really only freqs 1-10Hz
> Re: second- since you have only one channel you shouldn’t specify
> ‘neighbourdist’, but cfg.neighbours = []. In that way clustering is done
> along the freq and time dimensions the adjacency of which is defined by the
> time freq resolution.
>
> best
> tzvetan
>
>
> Hi fieldtripers,
>
> I am trying to do a cluster permutation on Time-frequency data of a single
> channel (of 64 channel EEG) in a between subject design based on the
> example provided here
> <http://www.fieldtriptoolbox.org/example/apply_clusterrandanalysis_on_tfrs_of_power_that_were_computed_with_besa>.
> Two weird things happen.
> First, although I set cfg.frequency = 'all' for stats, but it always
> returns results for only ~1-10Hz instead of 1:15 Hz I have in my freq data
> (to be precise : stat.cfg.frequency =[0.9995    9.9951]).
> Second, based on the explanation in this paper
> <http://www.sciencedirect.com/science/article/pii/S0165027007001707>, I
> assume cfg.neighbourdist in single-sensor test somehow shows the number of
> adjacent points, but when I change this number the clusters don't change at
> all.
> Here is my code, I would appreciate if anyone could tell me what is
> happening.
>
> Thanks,
> Tahereh
>
> % Time frequency analysis
> cfg = [];
> cfg.output     = 'pow';
> cfg.method     = 'mtmconvol';
> cfg.taper      = 'hanning';
> f1 = 1;f2 = 15; fstep = 0.1;
> cfg.foi        =f1:fstep:f2;
> t1 = -1; t2 = 1;
> cfg.toi        = t1:0.02:t2;
> n_cycles = 5;
> cfg.t_ftimwin  = n_cycles ./cfg.foi;
> cfg.keeptrials ='no';
>
> [freqdata] = ft_freqanalysis(cfg, data);
>
> %store freq data for each condition/subject
>  TFDesc(Condition,subject) =  {ft_freqdescriptives(cfg,freqdata)}
>
> %Comparing Condition1 and Condition2
> cfg = [];
> Condition1_avg= ft_freqgrandaverage(cfg, TFDesc{cond1,: });
> Condition2_avg =  ft_freqgrandaverage(cfg,  TFDesc{cond2,: });
>
> % make a dummy structure with the difference between Condition 1 & 2
> avgDiff = Condition1_avg;
> avgDiff.powspctrm = Condition1_avg.powspctrm-Condition2_avg.powspctrm;
>
> cfg = [];
> cfg.channel          =  'FP2'
> cfg.frequency        = 'all'
> cfg.neighbourdist    = 4;
> cfg.latency          = 'all'
> cfg.avgovertime      = 'no';
> cfg.avgoverfreq      ='no';
> cfg.avgoverchan      = 'no';
>
> cfg.clusteralpha     = 0.05;
> cfg.statistic        = 'ft_statfun_depsamplesT';
> cfg.numrandomization = 500;
> cfg.correctm         =   'cluster';
> cfg.method           = 'montecarlo';
> cfg.design           = [
>     1 2 3 4 5 6 7 8 9  1 2 3 4 5 6 7  8 9     % subject number
>     1 1 1 1 1 1 1 1 1   2 2 2 2 2 2 2 2 2   ];  % condition number
> cfg.uvar = 1;                                   % "subject" is unit of
> observation
> cfg.ivar = 2;                                   % "condition" is the
> independent variable
> cfg
> stat = ft_freqstatistics(cfg, TFDesc{cond1,selectedSubj},
> TFDesc{cond2,selectedSubj});
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20150606/b3fcae48/attachment-0002.html>


More information about the fieldtrip mailing list