<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div>I think Jan.Mathijs alternative suggestion is quite attractive. With the neighbors on a cortical sheet I also had the problems that sometimes the vertices do not have the same distance and then clustering may be biased to smaller or bigger clusters as the number of neighbors does not guarantee same cluster sizes. With the interpolation onto a 3D grid, you won't have that problem.<div><br></div><div>best,</div><div><br></div><div>Stephan</div><div><br></div><div><br><div>
<span class="Apple-style-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; orphans: 2; text-align: -webkit-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; font-size: medium; "><div><div>________________________________________________________</div><div>Stephan Moratti, PhD<br><br></div><div>see also: <a href="http://web.me.com/smoratti/">http://web.me.com/smoratti/</a><br><br></div><div>Universidad Complutense de Madrid</div><div>Facultad de Psicología</div><div>Departamento de Psicología Básica I</div><div>Campus de Somosaguas</div><div>28223 Pozuelo de Alarcón (Madrid)</div><div>Spain</div><div><br></div><div>and</div><div><br></div><div>Center for Biomedical Technology</div><div>Laboratory for Cognitive and Computational Neuroscience</div><div>Parque Científico y Tecnológico de la Universidad Politecnica de Madrid<br>Campus Montegancedo</div><div>28223 Pozuelo de Alarcón (Madrid)</div><div>Spain<br><br><br>email: <a href="mailto:smoratti@psi.ucm.es">smoratti@psi.ucm.es</a><br>Tel.:    +34 679219982</div></div></span>
</div>
<br><div><div>El 12/06/2013, a las 18:00, jan-mathijs schoffelen escribió:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">An alternative would be to interpolate the cortical sheet to a 3D grid (where the grid is defined for each subject based on a warped template grid defined in a standard space), and then do clustering using a regular 3D spatial neighbourhood structure. The rationale being that two vertices on the sheet may appear as disconnected  (e.g. being on two sides of a sulcus) whereas, given the poor spatial resolution, they belong to the same spatial blob.<div><br></div><div>Best,</div><div>Jan-Mathijs</div><div><br><div><div>On Jun 12, 2013, at 5:44 PM, <a href="mailto:smoratti@psi.ucm.es">smoratti@psi.ucm.es</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Dear Nicolai,<div><br></div><div>Indeed I have used ft_timelockstatistics for minimum norm source data. The trick is to put the source level data into a ERF structure. Determining the neighbors of a source surface with vertices is not trivial. However I used tess_vertconn.m from the BrainStorm toolbox to get the connectivity matrix that tells you who is a neighbor. This you can feed into timelockstats.</div><div><br></div><div>Hope that helps,</div><div><br></div><div>Stephan</div><div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-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; font-size: medium; "><div><div>________________________________________________________</div><div>Stephan Moratti, PhD<br><br></div><div>see also: <a href="http://web.me.com/smoratti/">http://web.me.com/smoratti/</a><br><br></div><div>Universidad Complutense de Madrid</div><div>Facultad de Psicología</div><div>Departamento de Psicología Básica I</div><div>Campus de Somosaguas</div><div>28223 Pozuelo de Alarcón (Madrid)</div><div>Spain</div><div><br></div><div>and</div><div><br></div><div>Center for Biomedical Technology</div><div>Laboratory for Cognitive and Computational Neuroscience</div><div>Parque Científico y Tecnológico de la Universidad Politecnica de Madrid<br>Campus Montegancedo</div><div>28223 Pozuelo de Alarcón (Madrid)</div><div>Spain<br><br><br>email: <a href="mailto:smoratti@psi.ucm.es">smoratti@psi.ucm.es</a><br>Tel.:    +34 679219982</div></div></span>
</div>
<br><div><div>El 12/06/2013, a las 15:44, Nicolai Mersebak escribió:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Dear all,<div><br></div><div>I have a question concerning <span style="color:rgb(0,0,0)">the usage of ft_sourcegrandaverage and ft_sourcestatistics. </span></div><div><font color="#000000"><br></font></div><div>
<font color="#000000">After using ft_sourceanalysis (method: MNE), I get spatio-temporal source reconstructed data in source.avg.pow (4050 x 897): 4050 sources and 897 time points. </font></div><div><font color="#000000"><br>
</font></div><div><font color="#000000">Now I would like to use the cluster-based permutation test on my source reconstructed data. However it seems like ft_sourcegrandaverage and</font><span style="color:rgb(0,0,0)"> ft_sourcestatistics don't support source level time courses. E.g when I am using </span><span style="color:rgb(0,0,0)">ft_sourcegrandaverage I am getting the following error:</span></div>
<div><font color="#000000"><br></font></div><div><div>Error in ft_sourcegrandaverage (line 158)</div><div>  dat(:,i) = tmp(:);</div><div><br></div><div style="">Looking into the code:</div><div style=""><br></div><div style=""><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 10px; font-family: Courier; ">
  <span style="color:rgb(4,51,255)">for</span> i=1:Nsubject</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 10px; font-family: Courier; ">    tmp = getsubfield(varargin{i}, parameterselection(cfg.parameter, varargin{i}));</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 10px; font-family: Courier; ">    dat(:,i) = tmp(:);</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 10px; font-family: Courier; ">    tmp = getsubfield(varargin{i}, <span style="color:rgb(178,69,243)">'inside'</span>);</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 10px; font-family: Courier; ">    inside(tmp,i) = 1;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 10px; font-family: Courier; color: rgb(4, 51, 255); "><span style="color:rgb(0,0,0)">  </span>end</div><div><br></div></div><div style="">I see that "tmp" are getting the structure [N_sources x timepoints] from source.avg.pow for one subject, where "dat" requires the structure [N_sources x 1]. <br>
</div><div style=""><br></div><div style="">I seached the mailing list for similar issues and found this thread:</div><div style=""><br></div><div style=""><a href="http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html">http://mailman.science.ru.nl/pipermail/fieldtrip/2010-September/003122.html</a><br>
</div><div style=""><br></div><div style="">Since I am interested in using the temporal dimension in my statistics, I would like to know if it is still not possible to use spatio-temporal source reconstructed data in ft_sourcestatistics and ft_sourcegrandaverage ?</div>
<div style=""><br></div><div style="">Or if any have succeeded in using the cluster-based permutation test on source level also including the temporal dimension ? </div><div style=""><br></div><div style="">Alternative I was thinking that I might could use ft_timelockstatistics, where I substituted the channels with sources, e.g instead of having 64 channels, I would now have 4050 "channels". </div>
<div style="">If so I need to calculate a label structure and an appropriate neighbor structure, which I guess is possible as I have all the 3D coordinates for each source, e.g in leadfield.pos ?</div><div style="">I know this is a work around solution, but have anyone tried or have any experience using such an approach ? </div>
<div style=""><br></div><div style="">Best,</div><div style=""><br></div><div style="">Nicolai</div><div><br></div></div></div>
_______________________________________________<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">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></blockquote></div><br></div></div>_______________________________________________<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">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-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; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-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; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-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; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-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; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-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; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-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; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; 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; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; 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; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; 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>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">J.Schoffelen@donders.ru.nl</a></div><div>Telephone: +31-24-3614793</div><div><br></div><div><a href="http://www.hettaligebrein.nl/">http://www.hettaligebrein.nl</a></div></div></span></div></span></div></span></div></span></div></span></div></span></div></span></div></span></span>
</div>
<br></div></div>_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</blockquote></div><br></div></body></html>