<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Matteo,<div><br></div><div>As far as I know, the indepsamplesZcoh only works properly if you compute your TFR using ft_freqanalysis with cfg.output = 'fourier'.</div><div>Note that the output of the statistics-function probably gives differential coherence spectra between all pairs of channels. The clustering will in this case not work, because the spatial channel neighbourhood structure supported to my knowledge only works with univariate test-statistics. This means that you shouldn't specify cfg.correctm = 'cluster'.</div><div><br></div><div>Cheers,</div><div><br></div><div>Jan-Mathijs</div><div><br><div><div>On Apr 28, 2010, at 1:57 PM, Matteo Demuru wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Dear Eric,<div><br></div><div>I have tried the between-trials experiment too, but the two problems still remain (the statfun_indepsamplesZcoh looks for label field. Furtheremore if I add it the reshape function crashes). Any other suggestions?</div> <div><br></div><div>I have also another question relative to your reply: the baseline and activation trials were already divided in the within-trials experiment, the only difference with the between-trials experiment are relative to the configuration parameters (i.e.  in between-trials only cfg.ivar is set while in within-trials cfg.ivar and cfg.uvar are set) am I wrong?</div> <div><br></div><div>Regarding the 'label field' problem, it seems a required field for the configuration struct because it is used in statfun_indepsamplesZcoh to calculate the channel combinations for the coherence.  </div> <div><br></div><div>Thanks a lot</div><div><br></div><div>Matteo</div><div><br></div><div><br><br><div class="gmail_quote">On Wed, Apr 28, 2010 at 9:17 AM, Eric Maris <span dir="ltr"><<a href="mailto:e.maris@donders.ru.nl">e.maris@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 lang="NL" link="blue" vlink="purple"> <div><p class="MsoNormal"><span style="font-size:11.0pt;color:#1F497D">Dear Matteo,</span></p><div><span style="font-size:11.0pt;color:#1F497D"> </span><br class="webkit-block-placeholder"></div><div><span style="font-size:11.0pt;color:#1F497D"> </span><br class="webkit-block-placeholder"></div><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D">The statfun indepsamplesZcoh can only be used in a between-trials experiment. You could cut out your baseline and activation segments separately and then compare them in a non-paired fashion.</span></p><div><span lang="EN-US" style="font-size:11.0pt;color:#1F497D"> </span><br class="webkit-block-placeholder"></div><div><span lang="EN-US" style="font-size:11.0pt;color:#1F497D"> </span><br class="webkit-block-placeholder"></div><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D">Best,</span></p><div><span lang="EN-US" style="font-size:11.0pt;color:#1F497D"> </span><br class="webkit-block-placeholder"></div><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;color:#1F497D">Eric</span></p><div><span lang="EN-US" style="font-size:11.0pt;color:#1F497D"> </span><br class="webkit-block-placeholder"></div><div><span lang="EN-US" style="font-size:11.0pt;color:#1F497D"> </span><br class="webkit-block-placeholder"></div> <div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt"> <div> <div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm"><p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt">From:</span></b><span lang="EN-US" style="font-size:10.0pt"> FieldTrip discussion list [mailto:<a href="mailto:FIELDTRIP@NIC.SURFNET.NL" target="_blank">FIELDTRIP@NIC.SURFNET.NL</a>] <b>On Behalf Of </b>Matteo Demuru<br> <b>Sent:</b> dinsdag 27 april 2010 16:21<br> <b>To:</b> <a href="mailto:FIELDTRIP@NIC.SURFNET.NL" target="_blank">FIELDTRIP@NIC.SURFNET.NL</a><br> <b>Subject:</b> [FIELDTRIP] Non parametric test on coherence</span></p> </div> </div><div><div></div><div class="h5"><div> <br class="webkit-block-placeholder"></div><p class="MsoNormal">Dear all,</p> <div><div> <br class="webkit-block-placeholder"></div> </div> <div><p class="MsoNormal">I have a problem using freqstatistics to calculate significance for coherence.</p> </div> <div><div> <br class="webkit-block-placeholder"></div> </div> <div><p class="MsoNormal">Specifically I have a subject and I am performing a within-trials experiment using 'indepsamplesZcoh' as statistic.</p> </div> <div><div> <br class="webkit-block-placeholder"></div> </div> <div><p class="MsoNormal">I calculate the TFR of my data with the cfg.output='powandcsd' and cfg.keeptrials='yes' parameters. Then I call freqstatistics to compare my different experimental conditions (baseline vs activation).</p> </div> <div><div> <br class="webkit-block-placeholder"></div> </div> <div><p class="MsoNormal">The function crashes with this output:   </p> </div> <div><div> <br class="webkit-block-placeholder"></div> </div> <div> <div><p class="MsoNormal">??? Reference to non-existent field 'label'.</p> </div> <div><div> <br class="webkit-block-placeholder"></div> </div> <div><p class="MsoNormal">Error in ==> statfun_indepsamplesZcoh at 76</p> </div> <div><p class="MsoNormal">  nchan = length(cfg.label);</p> </div> <div><div> <br class="webkit-block-placeholder"></div> </div> <div><p class="MsoNormal">I have tried to add this field to the cfg struct assigning the cell that contains the interested channels. However this time I have another error:</p> </div> </div> <div><div> <br class="webkit-block-placeholder"></div> </div> <div><p class="MsoNormal">??? Error using ==> reshape</p> </div> <div><p class="MsoNormal">To RESHAPE the number of elements must not change.</p> </div> <div><div> <br class="webkit-block-placeholder"></div> </div> <div><p class="MsoNormal">Error in ==> clusterstat at 178</p> </div> <div><p class="MsoNormal">      posclusobs = findcluster(reshape(postailobs, [cfg.dim,1]),channeighbstructmat,cfg.minnbchan);</p> </div> <div><div>   <br class="webkit-block-placeholder"></div> </div> <div><div> <br class="webkit-block-placeholder"></div> </div> <div><p class="MsoNormal">Any suggestions?</p> </div> <div><div> <br class="webkit-block-placeholder"></div> </div> <div><p class="MsoNormal">Thanks in advance</p> </div> <div><div> <br class="webkit-block-placeholder"></div> </div> <div><p class="MsoNormal">Matteo Demuru</p> </div> <div><div> <br class="webkit-block-placeholder"></div> </div> </div></div><p>----------------------------------</p><p>The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis.</p><p><a href="http://listserv.surfnet.nl/archives/fieldtrip.html" target="_blank">http://listserv.surfnet.nl/archives/fieldtrip.html</a></p><p><a href="http://www.ru.nl/fcdonders/fieldtrip/" target="_blank">http://www.ru.nl/fcdonders/fieldtrip/</a></p> </div> </div> </div><p>----------------------------------</p><p>The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis.</p><p>  <a href="http://listserv.surfnet.nl/archives/fieldtrip.html" target="_blank">http://listserv.surfnet.nl/archives/fieldtrip.html</a></p><p>  <a href="http://www.ru.nl/fcdonders/fieldtrip/" target="_blank">http://www.ru.nl/fcdonders/fieldtrip/</a></p> </blockquote></div><br></div><p>----------------------------------</p><p>The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis.</p><p>  <a href="http://listserv.surfnet.nl/archives/fieldtrip.html">http://listserv.surfnet.nl/archives/fieldtrip.html</a></p><p>  <a href="http://www.ru.nl/fcdonders/fieldtrip/">http://www.ru.nl/fcdonders/fieldtrip/</a></p> </blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-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; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Dr. J.M. (Jan-Mathijs) Schoffelen </div><div>Donders Institute for Brain, Cognition and Behaviour, <br>Centre for Cognitive Neuroimaging,<br>Radboud University Nijmegen, The Netherlands</div><div><a href="mailto:J.Schoffelen@donders.ru.nl">J.Schoffelen@donders.ru.nl</a></div><div>Telephone: 0031-24-3668063</div></div></span> </div><br></div></body></html><p>----------------------------------</p>
<p>The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis.</p>
<p>  http://listserv.surfnet.nl/archives/fieldtrip.html</p>
<p>  http://www.ru.nl/fcdonders/fieldtrip/</p>