Dear <span class="Apple-style-span" style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px">Jan-Mathijs,</span><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse:collapse"><br>
</span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse:collapse">Sorry I was so vague, i thought maybe it was a common problem...</span></font></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse:collapse"><br></span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse:collapse">OK, so i was running a clusterstat with the following input ( main point, i want to look at the difference between conditions over a set of frequencies)</span></font></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse:collapse">***</span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse:collapse"><p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00feff">
<span style="color:#00fb34">load </span>blk1_tf_avg</p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00feff"><span style="color:#00fb34">load </span>blk3_tf_avg</p>
<p style="margin:0px 0px 0px 0px;font:12.0px Courier;min-height:14.0px"><br></p><p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34">cfg = [];</p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34">cfg.latency          = [1.0 1.5 ];</p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34">cfg.frequency        = [4 8];</p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34">cfg.method           = <span style="color:#00feff">'montecarlo'</span>;</p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34">cfg.statistic        = <span style="color:#00feff">'depsamplesT'</span>;</p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34">cfg.correctm         = <span style="color:#00feff">'cluster'</span>;</p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34">cfg.clusteralpha     = 0.05;</p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34">cfg.clusterstatistic = <span style="color:#00feff">'maxsum'</span>;</p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34">cfg.minnbchan        = 2;</p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34">cfg.tail             = 0;</p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34">cfg.clustertail      = 0;</p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34">cfg.alpha            = 0.025;</p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34">cfg.numrandomization = 1000;</p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34">cfg.feedback = <span style="color:#00feff">'yes'</span>;</p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34">cfg.neighbours       = ft_neighbourselection(cfg, blk1_tf_avg); </p><div><span style="color:#000000"><p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34">
subj = 15;</p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34">design = zeros(2,2*subj);</p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34"><span style="color:#fcfc32">for</span> i = 1:subj</p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34">  design(1,i) = i;</p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#fcfc32">end</p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34"><span style="color:#fcfc32">for</span> i = 1:subj</p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34">  design(1,subj+i) = i;</p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#fcfc32">end</p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34">design(2,1:subj)        = 1;</p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34">design(2,subj+1:2*subj) = 2;</p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34;min-height:12.0px"><br></p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;min-height:12.0px"> </p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34">cfg.design   = design;</p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34">cfg.uvar     = 1;</p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34">cfg.ivar     = 2;</p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34;min-height:12.0px"> </p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34">[stat] = ft_freqstatistics(cfg, blk3_tf_avg, blk1_tf_avg);</p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34;min-height:12.0px"> </p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00feff"><span style="color:#00fb34">save </span>stat_tf_theta_1000_1500_bkey3vsbkey1<span style="color:#00fb34"> </span>stat</p><div><br></div></span></div></span></font></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse:collapse"><br></span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse:collapse">***</span></font></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse:collapse"><br></span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse:collapse">The error comes during the plotting phase when it says that i should not have multiple frequencies, as the data should be averaged across frequencies. And it does save my file (stat_theta....) but and i can see the pos/neg clusters in the data structure...but i can't plot with :</span></font></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse:collapse"><br></span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse:collapse"><p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34">
cfg = [];</p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34">cfg.highlightsymbolseries = [<span style="color:#00feff">'*'</span>,<span style="color:#00feff">'*'</span>,<span style="color:#00feff">'.'</span>,<span style="color:#00feff">'.'</span>,<span style="color:#00feff">'.'</span>];</p>

<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00feff"><span style="color:#00fb34">cfg.layout = </span>'/Applications/fieldtrip/template/neuromag306mag.lay'<span style="color:#00fb34">;</span></p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34">cfg.contournum = 0;</p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34">cfg.markersymbol = <span style="color:#00feff">'.'</span>;</p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34">cfg.alpha = 0.05;</p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34">cfg.zparam = <span style="color:#00feff">'stat'</span>;</p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34">ft_clusterplot(cfg,stat);</p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34;min-height:12.0px"> </p>
<p style="margin:0px 0px 0px 0px;font:12.0px Courier;min-height:14.0px"><br></p><p style="margin:0px 0px 0px 0px;font:12.0px Courier;min-height:14.0px">I have also tried plotting with the script from the tutorial </p><p style="margin:0px 0px 0px 0px;font:12.0px Courier;min-height:14.0px">
</p><p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34">pos_cluster_pvals = [stat.posclusters(:).prob];</p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34">pos_signif_clust = find(pos_cluster_pvals < stat.cfg.alpha);</p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34">pos = ismember(stat.posclusterslabelmat, pos_signif_clust);</p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34;min-height:12.0px"> </p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34">neg_cluster_pvals = [stat.negclusters(:).prob];</p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34">neg_signif_clust = find(neg_cluster_pvals < stat.cfg.alpha);</p>
<p style="margin:0px 0px 0px 0px;font:10.0px Courier;color:#00fb34">neg = ismember(stat.negclusterslabelmat, neg_signif_clust);</p>
<p></p></span></font><span class="Apple-style-span" style="border-collapse:collapse;color:rgb(0,251,52);font-family:Courier;font-size:10px"><span style="color:#fcfc32">for</span> k = 1:20;</span></div><div><font class="Apple-style-span" color="#00fb34" face="Courier" size="1"><span class="Apple-style-span" style="border-collapse:collapse"><br>
</span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse:collapse">etc.</span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse:collapse">but this makes the plot really weird looking...and i am not sure how i can only plot the data from the frequencies i would like to display (in this case 4-8Hz). I know how to make the subtraction image (between my two conditions), but not how to specify the frequency range that i want displayed...</span></font></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse:collapse"><br></span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse:collapse">If this is too complicated, is there a way to average over a set of frequencies in the data, and then just input files into the permutation test that are already collapsed across the frequency range i am interested in?</span></font></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse:collapse"><br></span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse:collapse"><br>
</span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse:collapse">Thank  you!</span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse:collapse">z</span></font></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse:collapse"><br></span></font><br><div class="gmail_quote">On Mon, Dec 12, 2011 at 7:59 AM, jan-mathijs schoffelen <span dir="ltr"><<a href="mailto:jan.schoffelen@donders.ru.nl">jan.schoffelen@donders.ru.nl</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">Hi Zita,<div><br></div><div>Could you provide some more information please? What plotting function are you using? What does the stat-structure look like etc.? With sufficient additional information we can try and reproduce the problem, and if it's a bug fix it. If it's not a bug, we may give you some hints to fool the system...</div>
<div><br></div><div>BW,</div><div><br></div><div>Jan-Mathijs</div><div><br><div><div><div></div><div class="h5"><div>On Dec 11, 2011, at 8:28 PM, Zita Eva Patai wrote:</div><br></div></div><blockquote type="cite"><div><div>
</div><div class="h5"><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px">Dear FT-ers,<div><br></div><div>I have tried to run a permutation test on time-frequency data, and would have like to see a statistical evealuation over a set of frequencies (ex: 4-8Hz)</div>

<div><br></div><div>It seems that the test itself runs, but it crashes when i try to plot the data, saying that 'stat' must not contain multiple frequencies.</div><div><br></div><div>I was wondering if there was a way to evaluate the difference between two conditions over a set range of frequencies?</div>

<div><br></div><div>Thank you!</div><div>zita</div></span><br clear="all"><div><br></div>-- <br><div><br></div><div>Zita Patai</div><div>DPhil Candidate, Experimental Psychology</div><div>University of Oxford</div><div><a href="http://bcl.psy.ox.ac.uk/people/zita-eva-patai/" target="_blank">bcl.psy.ox.ac.uk/people/zita-eva-patai/</a></div>

<div><a href="mailto:eva.patai@psy.ox.ac.uk" target="_blank">eva.patai@psy.ox.ac.uk</a></div><div><br></div><br></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>
<span style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><span style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><div style="word-wrap:break-word">
<span style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><div style="word-wrap:break-word">
<span style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><div style="word-wrap:break-word">
<span style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium"><div style="word-wrap:break-word">
<span style="border-collapse:separate;color:rgb(0,0,0);font-family:Helvetica;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div style="word-wrap:break-word">
<div>Jan-Mathijs Schoffelen, MD PhD </div><div><br></div><div>Donders Institute for Brain, Cognition and Behaviour, <br>Centre for Cognitive Neuroimaging,<br>Radboud University Nijmegen, The Netherlands</div><div><br></div>
<div>Max Planck Institute for Psycholinguistics,</div><div>Nijmegen, The Netherlands</div><div><br></div><div><a href="mailto:J.Schoffelen@donders.ru.nl" target="_blank">J.Schoffelen@donders.ru.nl</a></div><div>Telephone: <a href="tel:%2B31-24-3614793" value="+31243614793" target="_blank">+31-24-3614793</a></div>
</div></span></div></span></div></span></div></span></div></span></span>
</div>
<br></div></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><br clear="all"><div><br></div>-- <br><div><br></div>
<div>Zita Patai</div><div>DPhil Candidate, Experimental Psychology</div><div>University of Oxford</div><div><a href="http://bcl.psy.ox.ac.uk/people/zita-eva-patai/" target="_blank">bcl.psy.ox.ac.uk/people/zita-eva-patai/</a></div>
<div><a href="mailto:eva.patai@psy.ox.ac.uk" target="_blank">eva.patai@psy.ox.ac.uk</a></div><div><br></div><br>
</div>