<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)"><style><!--
/* Font Definitions */
@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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></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 lang=EN-CA link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal><span style='font-size:12.0pt'>Dear Fieldtrip community,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt'>I’m sorry to take your time, but any insights you have regarding this question would be greatly appreciated:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt'>I am trying to run a cluster-based permutation independent samples ANCOVA on 125-channel ERP averages comparing autistic and typically-developing groups.  I’m trying to covary for multiple continuous between-subject variables, like IQ, age, etc.  I did look around for previous solutions to this issue, but I couldn’t find anything exactly like what I was looking for.</span><span style='font-size:12.0pt'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt'>I’ve attached my somewhat slow and inelegant function that tries to call a MATLAB ANCOVA function to control for 2 covariates in an ANCOVA.  It seems to yield plausible F-statistics, but the p-values do not seem sensible to me – they seem grossly inflated or deflated – which makes me wonder what happens to the covariates when the permutation distribution is being created.  Based on some comments in the Fieldtrip documentation I thought it would be possible to supply 2 different covariates on different cvar lines, e.g.:</span><span style='font-size:12.0pt'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt'>cfg.design(2,:)                     = WISC_PRI_IQ;</span><span style='font-size:12.0pt'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt'>cfg.design(3,:)                     = chron_age;</span><span style='font-size:12.0pt'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt'>cfg.cvar                            = [2,3];</span><span style='font-size:12.0pt'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt'>However, I’m wondering if that is mistaken?  Is Fieldtrip able to make sense of two different control variables in the permutations?<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt'>I also have, in general, no clue what is happening to the cvar in the permutations and whether using the cvar option even makes sense for these kinds of between-subjects covariates…  I tried to look at the resampledesign function, but I’m afraid I was not clever enough to figure out what it does.</span><span style='font-size:12.0pt'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt'>Thanks so much!<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt'>Patrick<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;mso-fareast-language:EN-CA'>Patrick Dwyer<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;mso-fareast-language:EN-CA'>Ph.D. Student, Developmental Psychology<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;mso-fareast-language:EN-CA'><a href="http://riveralab.ucdavis.edu/"><span style='color:#0563C1'>Neurocognitive Development Lab</span></a><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;mso-fareast-language:EN-CA'>Center for Mind and Brain, UC Davis<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;mso-fareast-language:EN-CA'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;mso-fareast-language:EN-CA'>Personal Blog: <a href="http://www.autisticscholar.com/"><span style='color:#0563C1'>http://www.autisticscholar.com/</span></a><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:12.0pt;mso-fareast-language:EN-CA'>Pronouns: he/him/his<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>