<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;
        color:black;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:614024555;
        mso-list-type:hybrid;
        mso-list-template-ids:459701228 161361768 134807555 134807557 134807553 134807555 134807557 134807553 134807555 134807557;}
@list l0:level1
        {mso-level-start-at:0;
        mso-level-number-format:bullet;
        mso-level-text:-;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-font-family:Calibri;
        mso-bidi-font-family:"Times New Roman";}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body bgcolor=white lang=EN-GB link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>Dear Eric, Tom, Arjen<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>Thanks for the information and it’s good to know the functionality I need is already there. Just to clarify, I understand the situation as thus (please correct any errors of understanding):<o:p></o:p></span></p><p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo2'><![if !supportLists]><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>          </span></span></span><![endif]><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>The ft_statfun_</span><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>indepsamplesregrT function can be used to calculate parametric linear regression statistics with ivar as the independent variable of interest, e.g. a behavioural variable across trials or subjects, and uvar as units (e.g. trials or subjects).</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoListParagraph style='text-indent:-18.0pt;mso-list:l0 level1 lfo2'><![if !supportLists]><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><span style='mso-list:Ignore'>-<span style='font:7.0pt "Times New Roman"'>          </span></span></span><![endif]><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>The new ft_statfun_intersubcorr can calculate Spearman correlation statistics between subjects (but not between trials), and doesn’t currently have a parametric (e.g., Pearson’s) option, although this appears to be covered by the ft_statfun_</span><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>indepsamplesregrT function anyway. By the way, in the </span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>ft_statfun_intersubcorr description/instructions, some of the text appears to refer to ft_statfun_depsamplesT instead. Can I assume that ivar is in fact the behavioural variable of interest rather than “conditions that must be compared” as currently stated? Also, what is the reason this function cannot be used across trials within a subject?<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>Best wishes<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>Chris<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><div><p class=MsoNormal style='background:white'><b><span style='font-size:9.0pt;font-family:"Verdana",sans-serif'>Dr Christopher Brown</span></b><span style='font-size:9.0pt;font-family:"Verdana",sans-serif'> <o:p></o:p></span></p><p class=MsoNormal style='background:white'><i><span style='font-size:9.0pt;font-family:"Verdana",sans-serif'>Research Associate | CamPain Research Group | Department of Anaesthesia | University of Cambridge</span></i><span style='font-size:9.0pt;font-family:"Verdana",sans-serif'> <br><br>Box 93 <br>Addenbrooke's Hospital <br>Hills Road <br>Cambridge CB2 0QQ <br><br>01223 256 995<o:p></o:p></span></p></div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'>From:</span></b><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:windowtext'> fieldtrip-bounces@science.ru.nl [mailto:fieldtrip-bounces@science.ru.nl] <b>On Behalf Of </b>Tom Marshall<br><b>Sent:</b> 08 December 2014 15:10<br><b>To:</b> FieldTrip discussion list<br><b>Subject:</b> Re: [FieldTrip] Cluster analysis on correlation statistics<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='margin-bottom:12.0pt'>Hm... it seems that I may have reinvented the wheel (or perhaps invented a cruder wheel before Eric and co provided this more streamlined one).<br><br>Eric, can indepsamplesregrT also compute nonparametric correlation coefficients (eg Spearman)?<br><br>Best,<br>Tom<o:p></o:p></p><div><p class=MsoNormal>On 12/8/2014 3:56 PM, Maris, E.G.G. (Eric) wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Hi Chris,</span><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif'> <o:p></o:p></span></p></div><div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'><div><div><div><p class=MsoNormal><span lang=EN-US style='font-family:"Calibri",sans-serif'>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><span style='font-family:"Calibri",sans-serif'>Not linear regression across conditions as is already implemented in the ft_statfun_depsamplesregrT function.</span><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif'><o:p></o:p></span></p></div></div><div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif'> <o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>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><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif'> <o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>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><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif'> <o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Best,</span><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif'> <o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Eric Maris</span><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif'><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif'> <o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif'> <o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif'> <o:p></o:p></span></p></div></div></div></div><div><div class=MsoNormal align=center style='text-align:center'><hr size=2 width="100%" align=center></div><div id=divRpF665121><p class=MsoNormal style='margin-bottom:12.0pt'><b><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif'>Van:</span></b><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif'> Dr C A Brown [</span><a href="mailto:cb802@cam.ac.uk"><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif'>cb802@cam.ac.uk</span></a><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif'>]<br><b>Verzonden:</b> zaterdag 6 december 2014 12:33<br><b>Aan:</b> </span><a href="mailto:fieldtrip@science.ru.nl"><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif'>fieldtrip@science.ru.nl</span></a><span style='font-size:10.0pt;font-family:"Tahoma",sans-serif'><br><b>Onderwerp:</b> Re: [FieldTrip] Cluster analysis on correlation statistics</span><o:p></o:p></p></div><div><div><div><p class=MsoNormal><span style='font-family:"Calibri",sans-serif'>Hello again,<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-family:"Calibri",sans-serif'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-family:"Calibri",sans-serif'>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.<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-family:"Calibri",sans-serif'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-family:"Calibri",sans-serif'>Many thanks<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-family:"Calibri",sans-serif'>Chris <o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-family:"Calibri",sans-serif'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-family:"Calibri",sans-serif'>Dr Christopher Brown<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-family:"Calibri",sans-serif'>Research Associate<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-family:"Calibri",sans-serif'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-family:"Calibri",sans-serif'>Sent from a mobile device, please excuse my brevity.<o:p></o:p></span></p></div><p class=MsoNormal><span style='font-family:"Calibri",sans-serif'><o:p> </o:p></span></p><div id="htc_header"><p class=MsoNormal><span style='font-family:"Calibri",sans-serif'>----- Reply message -----<br>From: "Christopher Brown" </span><a href="mailto:cb802@cam.ac.uk"><span style='font-family:"Calibri",sans-serif'><cb802@cam.ac.uk></span></a><span style='font-family:"Calibri",sans-serif'><br>To: </span><a href="mailto:fieldtrip@science.ru.nl"><span style='font-family:"Calibri",sans-serif'><fieldtrip@science.ru.nl></span></a><span style='font-family:"Calibri",sans-serif'><br>Subject: Cluster analysis on correlation statistics<br>Date: Sat, Dec 6, 2014 07:49<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p>Dear all<o:p></o:p></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.<o:p></o:p></p><p>Kind regards<o:p></o:p></p><p>Chris<o:p></o:p></p><div><p class=MsoNormal>-- <o:p></o:p></p><pre><strong><span style='font-family:"Courier New"'>Dr Christopher Brown</span></strong> <o:p></o:p></pre><pre><em><span style='font-family:"Courier New"'>Research Associate | CamPain Group | Division of Anaesthesia | School of Clinical Medicine | University of Cambridge</span></em> <o:p></o:p></pre><pre><o:p> </o:p></pre><pre>Box 93 <o:p></o:p></pre><pre>Addenbrooke's Hospital <o:p></o:p></pre><pre>Hills Road <o:p></o:p></pre><pre>Cambridge CB2 0QQ <o:p></o:p></pre><pre><o:p> </o:p></pre><pre>01223 256 995<o:p></o:p></pre></div></div></div></div><p class=MsoNormal><br><br><br><o:p></o:p></p><pre>_______________________________________________<o:p></o:p></pre><pre>fieldtrip mailing list<o:p></o:p></pre><pre><a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><o:p></o:p></pre><pre><a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><o:p></o:p></pre></blockquote><p class=MsoNormal><o:p> </o:p></p></div></body></html>