<div dir="ltr">Thanks Tzvetan for clarification on question 2. I am still dealing with issue 1 (<span style="font-size:12.8000001907349px"> 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 </span><span style="font-size:12.8000001907349px">cfg.frequency = [1 8], it works fine</span><span style="font-size:12.8000001907349px"> </span>)<div>Anybody has a clue why?</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 5, 2015 at 10:11 PM, Tzvetan Popov <span dir="ltr"><<a href="mailto:tzvetan.popov@uni-konstanz.de" target="_blank">tzvetan.popov@uni-konstanz.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>Hi Tahereh,</div><div>Re: first- this shouldn’t happen unless you have really only freqs 1-10Hz</div><div>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.</div><div><br></div><div>best</div><div>tzvetan</div><div><br><br><blockquote type="cite"><div><div class="h5"><div dir="ltr">Hi fieldtripers,<div><br></div><div>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 <a href="http://www.fieldtriptoolbox.org/example/apply_clusterrandanalysis_on_tfrs_of_power_that_were_computed_with_besa" target="_blank">here</a>. Two weird things happen. </div><div>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]).</div><div>Second, based on the explanation in <a href="http://www.sciencedirect.com/science/article/pii/S0165027007001707" target="_blank">this paper</a>, 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. </div><div>Here is my code, I would appreciate if anyone could tell me what is happening.</div><div><br></div><div>Thanks,</div><div>Tahereh </div><div><br></div><div>% Time frequency analysis</div><div><div>cfg = [];</div><div>cfg.output = 'pow';</div><div>cfg.method = 'mtmconvol';</div><div>cfg.taper = 'hanning';</div><div>f1 = 1;f2 = 15; fstep = 0.1;</div><div>cfg.foi =f1:fstep:f2;</div><div>t1 = -1; t2 = 1;</div><div>cfg.toi = t1:0.02:t2;</div><div>n_cycles = 5;</div><div>cfg.t_ftimwin = n_cycles ./cfg.foi; </div><div>cfg.keeptrials ='no';</div></div><div><br></div><div>[freqdata] = ft_freqanalysis(cfg, data);<br></div><div><br></div><div>%store freq data for each condition/subject</div><div> TFDesc(Condition,subject) = {ft_freqdescriptives(cfg,freqdata)}<br></div><div><br></div><div>%Comparing Condition1 and Condition2</div><div><div>cfg = [];</div><div>Condition1_avg= ft_freqgrandaverage(cfg, TFDesc{cond1,: });</div><div>Condition2_avg = ft_freqgrandaverage(cfg, TFDesc{cond2,: });</div></div><div><br></div><div>% make a dummy structure with the difference between Condition 1 & 2<br></div><div>avgDiff = Condition1_avg;<br></div><div>avgDiff.powspctrm = Condition1_avg.powspctrm-Condition2_avg.powspctrm;</div><div><br></div><div><div>cfg = [];</div><div>cfg.channel = 'FP2'<br></div><div>cfg.frequency = 'all'</div><div>cfg.neighbourdist = 4;</div><div>cfg.latency = 'all'</div><div>cfg.avgovertime = 'no';</div><div>cfg.avgoverfreq ='no';</div><div>cfg.avgoverchan = 'no';</div><div><br></div><div>cfg.clusteralpha = 0.05;</div><div>cfg.statistic = 'ft_statfun_depsamplesT';</div><div>cfg.numrandomization = 500;</div><div>cfg.correctm = 'cluster';</div><div>cfg.method = 'montecarlo';</div><div>cfg.design = [</div><div> 1 2 3 4 5 6 7 8 9 1 2 3 4 5 6 7 8 9 % subject number</div><div> 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 ]; % condition number</div><div>cfg.uvar = 1; % "subject" is unit of observation</div><div>cfg.ivar = 2; % "condition" is the independent variable</div><div>cfg</div><div>stat = ft_freqstatistics(cfg, TFDesc{cond1,selectedSubj}, TFDesc{cond2,selectedSubj});</div></div><div><br></div><div><br></div></div></div></div>
_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></blockquote></div><br></div><br>_______________________________________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br></blockquote></div><br></div>