Hi Marco,<div><br></div><div>Could it be that you didn't define cfg.channel, cfg.latency, and cfg.frequency? (and cfg.avgoverfreq—unless, is there a way to run a cluster analysis across multiple frequencies?) It seems to me that for a cluster analysis on plv data you need to rename the 'plvspctrm' field to 'cohspctrm' and define cfg.channel with the format {'channel - cohrefchannel'} (should be how it was input in the original ft_freqanalysis function).</div>
<div><br></div><div>Hope that helps.</div><div>Matt<br><br><div class="gmail_quote">On Fri, Mar 25, 2011 at 10:09 AM, BrainBalance Solutions <span dir="ltr"><<a href="mailto:info@bbss.it">info@bbss.it</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi there,<div>I'm trying to perform the same analysis and the trick Jan give to tranform the pvlspctrm to powerspctrm and labels give me the ability to compute the grandaverage.</div>
<div>But now I'm trying to do a cluster analysis and if I give this simple script:</div>
<div><br></div><div><div>load GApun;</div><div>load GArew;</div><div><br></div><div>cfg = [];</div><div>cfg.method = 'montecarlo';</div><div>cfg.statistic = 'depsamplesT';</div><div>cfg.correctm = 'cluster';</div>
<div>cfg.clusteralpha = 0.05;</div><div>cfg.clusterstatistic = 'maxsum';</div><div>cfg.minnbchan = 2;</div><div>cfg.tail = 0;</div><div>cfg.clustertail = 0;</div><div>cfg.alpha = 0.025;</div>
<div>cfg.numrandomization = 500;</div><div><br></div><div>subj = 40;</div><div>design = zeros(2,2*subj);</div><div>for i = 1:subj</div><div> design(1,i) = i;</div><div>end</div><div>for i = 1:subj</div><div> design(1,subj+i) = i;</div>
<div>end</div><div>design(2,1:subj) = 1;</div><div>design(2,subj+1:2*subj) = 2;</div><div><br></div><div>cfg.design = design;</div><div>cfg.uvar = 1;</div><div>cfg.ivar = 2;</div><div><br></div><div>[stat] = ft_freqstatistics(cfg, GApun, GArew);</div>
</div><div><br></div><div><br></div><div><br></div><div>I have this error:</div><div><div>??? Undefined function or variable "sens".</div><div><br></div><div>Error in ==> ft_neighbourselection at 95</div><div>
if ~isstruct(sens)</div><div><br></div><div>Error in ==> statistics_wrapper at 241</div><div> cfg.neighbours = ft_neighbourselection(cfg,varargin{1});</div><div class="im"><div><br></div><div>Error in ==> ft_freqstatistics at 127</div>
<div>[stat, cfg] = statistics_wrapper(cfg, varargin{:});</div><div><br></div></div><div>Error in ==> calcoloStudent at 31</div><div>[stat] = ft_freqstatistics(cfg, GApun, GArew); </div></div><div><br></div><div><br></div>
<div>
<br></div><div>Following the errors I've found that the problem is in:</div><div>cfg.correctm = 'cluster';</div><div><br></div><div>If I comment it some analysis are done, but I think that clusters are skipped (here are some comments):</div>
<div><br></div><div><div>Warning: The field cfg.clusterstatistic is unused, it will be removed from your</div><div>configuration</div><div>The field cfg.clusteralpha is unused, it will be removed from your configuration</div>
<div>The field cfg.clustertail is unused, it will be removed from your configuration</div></div><div><br></div><div>and at the end of randomization:</div><div>not performing a correction for multiple comparisons</div><div>
<br></div><div><br></div><div>Any idea?</div><div><br></div><div>Marco</div><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>