<div dir="ltr"><div><div>Hey Chris,<br><br></div>We've recently included a function, ft_statfun_intersubcorr, that seems to do what you're asking for (i.e. a brain-behavior correlation across subject/trials). It works fine, but given that it hasn't been fully accommodated, it has yet not been documented. Please check the help for further instructions on how to use this function.<br><br></div>Best regards,<br>Arjen<br><div><div><br><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2014-12-08 15:56 GMT+01:00 Maris, E.G.G. (Eric) <span dir="ltr"><<a href="mailto:e.maris@donders.ru.nl" target="_blank">e.maris@donders.ru.nl</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div style="FONT-SIZE:10pt">
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">
<div style="MARGIN:0px"><font face="Times New Roman,serif" size="3"><span style="FONT-SIZE:12pt"><font face="Calibri,sans-serif" color="#1f497d"><span style="FONT-SIZE:11pt">Hi Chris,</span></font></span></font></div>
<div style="MARGIN:0px"><font face="Times New Roman,serif" size="3"><span style="FONT-SIZE:12pt"><font face="Calibri,sans-serif" color="#1f497d"><span style="FONT-SIZE:11pt"></span></font></span></font> </div>
<div style="BORDER-TOP-STYLE:none;BORDER-BOTTOM-STYLE:none;PADDING-BOTTOM:0px;PADDING-TOP:0px;BORDER-RIGHT-STYLE:none;PADDING-LEFT:4pt;BORDER-LEFT:blue 1.5pt solid;PADDING-RIGHT:0px">
<div><span class="">
<div>
<div style="MARGIN:0px"><font face="Times New Roman,serif" size="3"><span style="FONT-SIZE:12pt"><font face="Calibri,sans-serif"><span lang="en-US">Just to clarify my last email: I'm referring to correlation between either single trial data within subject,
 or averaged ERPs across subjects, with a behavioral variable. </span></font><font face="Calibri,sans-serif">Not linear regression across conditions as is already implemented in the ft_statfun_depsamplesregrT function.</font></span></font></div>
</div>
</span><div>
<div style="MARGIN:0px"><font face="Times New Roman,serif" size="3"><span style="FONT-SIZE:12pt"><font face="Calibri,sans-serif" color="#1f497d"></font></span></font> </div>
<div style="MARGIN:0px"><font face="Times New Roman,serif" size="3"><span style="FONT-SIZE:12pt"><font face="Calibri,sans-serif" color="#1f497d"><span style="FONT-SIZE:11pt" lang="en-US">For correlating/regressing single trial data of a single subject,
 you use the ft_statfun_indepsamplesregrT (with the units-of-observations being the trials, which each correspond to one column of your design matrix).
</span></font></span></font></div>
<div style="MARGIN:0px"><font face="Times New Roman,serif" size="3"><span style="FONT-SIZE:12pt"><font face="Calibri,sans-serif" color="#1f497d"><span style="FONT-SIZE:11pt" lang="en-US"></span></font></span></font> </div>
<div style="MARGIN:0px"><font face="Times New Roman,serif" size="3"><span style="FONT-SIZE:12pt"><font face="Calibri,sans-serif" color="#1f497d"><span style="FONT-SIZE:11pt" lang="en-US">For correlating/regressing subject-averaged data of a group
 of subjects, you also use the ft_statfun_indepsamplesregrT (with the units-of-observations being the subjects, which each correspond to one column of your design matrix).  Note, in this case your behavioral data (accuracy or RT) or also subject averages.</span></font></span></font></div>
<div style="MARGIN:0px"><font face="Times New Roman,serif" size="3"><span style="FONT-SIZE:12pt"><font face="Calibri,sans-serif" color="#1f497d"><span style="FONT-SIZE:11pt" lang="en-US"></span></font></span></font> </div>
<div style="MARGIN:0px"><font face="Times New Roman,serif" size="3"><span style="FONT-SIZE:12pt"><font face="Calibri,sans-serif" color="#1f497d"><span style="FONT-SIZE:11pt" lang="en-US">Best,</span></font></span></font></div>
<div style="MARGIN:0px"><font face="Times New Roman,serif" size="3"><span style="FONT-SIZE:12pt"><font face="Calibri,sans-serif" color="#1f497d"><span style="FONT-SIZE:11pt" lang="en-US"></span></font></span></font> </div>
<div style="MARGIN:0px"><font face="Times New Roman,serif" size="3"><span style="FONT-SIZE:12pt"><font face="Calibri,sans-serif" color="#1f497d"><span style="FONT-SIZE:11pt" lang="en-US">Eric Maris</span></font></span></font></div>
<div style="MARGIN:0px"><font face="Times New Roman,serif" size="3"><span style="FONT-SIZE:12pt"><font face="Calibri,sans-serif" color="#1f497d"><span style="FONT-SIZE:11pt" lang="en-US"></span></font></span></font> </div>
<div style="MARGIN:0px"><font face="Times New Roman,serif" size="3"><span style="FONT-SIZE:12pt"><font face="Calibri,sans-serif" color="#1f497d"><span style="FONT-SIZE:11pt" lang="en-US"></span></font></span></font> </div>
<div style="MARGIN:0px"><font face="Times New Roman,serif" size="3"><span style="FONT-SIZE:12pt"><font face="Calibri,sans-serif" color="#1f497d"><span style="FONT-SIZE:11pt" lang="en-US"></span></font></span></font> </div>
</div>
</div>
</div>
<div style="FONT-SIZE:16px;FONT-FAMILY:Times New Roman;COLOR:#000000">
<hr>
<div style="DIRECTION:ltr"><font face="Tahoma" color="#000000"><b>Van:</b> Dr C A Brown [<a href="mailto:cb802@cam.ac.uk" target="_blank">cb802@cam.ac.uk</a>]<br>
<b>Verzonden:</b> zaterdag 6 december 2014 12:33<br>
<b>Aan:</b> <a href="mailto:fieldtrip@science.ru.nl" target="_blank">fieldtrip@science.ru.nl</a><br>
<b>Onderwerp:</b> Re: [FieldTrip] Cluster analysis on correlation statistics<br>
</font><br>
</div><span class="">
<div></div>
<div>
<div style="FONT-SIZE:12pt;FONT-FAMILY:Calibri,sans-serif">
<div>Hello again,</div>
<div><br>
</div>
<div>Just to clarify my last email: I'm referring to correlation between either single trial data within subject, or averaged ERPs across subjects, with a behavioral variable. Not linear regression across conditions as is already implemented in the ft_statfun_depsamplesregrT
 function.</div>
<div><br>
</div>
<div>Many thanks</div>
<div>Chris </div>
<div><br>
</div>
<div>Dr Christopher Brown</div>
<div>Research Associate</div>
<div><br>
</div>
<div>Sent from a mobile device, please excuse my brevity.</div>
<br>
<div>----- Reply message -----<br>
From: "Christopher Brown" <<a href="mailto:cb802@cam.ac.uk" target="_blank">cb802@cam.ac.uk</a>><br>
To: <<a href="mailto:fieldtrip@science.ru.nl" target="_blank">fieldtrip@science.ru.nl</a>><br>
Subject: Cluster analysis on correlation statistics<br>
Date: Sat, Dec 6, 2014 07:49</div>
</div>
<br>
<p>Dear all</p>
<p>I would like to use the cluster analysis functions in Fieldtrip on correlation statistics. I note there has been some discussion about this on this list in the past but I haven't come across the necessary ft_statfun_corr function to allow this analysis.
 It would be great if somebody has this code and could share it with me; otherwise, I will embark on writing it myself and sharing my results with everyone for feedback. Being new to Fieldtrip I would greatly appreciate any collaborative help with this. May
 I check my understanding on something before getting started: To allow for multiple comparisons correction using monte carlo for example, as part of a cluster analysis, I presume the output of the function must be t values rather than correlation coefficients?
 Any other hints as to how to write this are most welcome.</p>
<p>Kind regards</p>
<p>Chris</p>
<div>-- <br>
<pre><strong>Dr Christopher Brown</strong> 
<em>Research Associate </em><em>| CamPain Group </em><em>| Division of Anaesthesia | School of Clinical Medicine | University of Cambridge</em> </pre>
<pre><br>Box 93 <br>Addenbrooke's Hospital <br>Hills Road <br>Cambridge CB2 0QQ <br><br>01223 256 995</pre>
</div>
</div>
</span></div>
</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></div>