<div dir="ltr"><div class="gmail_default" style="font-family:times new roman,serif;font-size:large">Hi Xiaoming and Arjen,</div><div class="gmail_default" style="font-family:times new roman,serif;font-size:large"><br></div><div class="gmail_default" style="font-family:times new roman,serif;font-size:large">After updating to the latest Fieldtrip, the code from the tutorial worked.</div><div class="gmail_default" style="font-family:times new roman,serif;font-size:large"><br></div><div class="gmail_default" style="font-family:times new roman,serif;font-size:large">Thank you so much!</div><div class="gmail_default" style="font-family:times new roman,serif;font-size:large">Kaitlyn</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 2, 2016 at 5:54 PM, Xiaoming Du <span dir="ltr"><<a href="mailto:XDu@mprc.umaryland.edu" target="_blank">XDu@mprc.umaryland.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div style="MARGIN:4px 4px 1px;FONT:10pt Tahoma">
<div>Hi Kaitlyn,</div>
<div> </div>
<div>Which version of Fiedtrip you are using? </div>
<div> </div>
<div>I got similar error message when I used old version, but no error when I updated to latest version. </div>
<div> </div>
<div>Hope this will help.</div>
<div> </div>
<div>Xiaoming</div>
<div> </div>
<div><br>>>> Arjen Stolk <<a href="mailto:a.stolk8@gmail.com" target="_blank">a.stolk8@gmail.com</a>> 5/2/2016 4:41 PM >>><br></div><div><div class="h5">
<div dir="ltr">Hi Kaitlyn,
<div><br></div>
<div class="gmail_extra">
<div class="gmail_quote">
<blockquote style="BORDER-LEFT:rgb(204,204,204) 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">
<div>
<div dir="ltr">
<div>
<p style="LINE-HEIGHT:normal;MARGIN:0px;MIN-HEIGHT:14px"><font color="#000000" size="4" face="times new roman, serif">My question is this: what is the appropriate design array for computing a correlation with ft_statfun_correlationT? Is the behavioral variable supposed to be part of the design or must it be part of a dummy structure designed to be similar in size and structure to the frequency data?</font></p></div></div></div></blockquote>
<div><br></div>
<div>It's really as described on the page you referred to (<a href="http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables" target="_blank">http://www.fieldtriptoolbox.org/faq/how_can_i_test_for_correlations_between_neuronal_data_and_quantitative_stimulus_and_behavioural_variables</a>)</div>
<div><br></div>
<div><pre style="BORDER-BOTTOM:rgb(204,204,204) 1px dashed;TEXT-ALIGN:justify;BORDER-LEFT:rgb(204,204,204) 1px dashed;PADDING-BOTTOM:0.5em;BACKGROUND-COLOR:rgb(247,249,250);MARGIN-TOP:0px;PADDING-LEFT:0.5em;WIDTH:640px;PADDING-RIGHT:0.5em;FONT-FAMILY:Consolas,'Andale Mono',Menlo,Monaco,monospace;WHITE-SPACE:pre-wrap;COLOR:rgb(0,0,0);FONT-SIZE:12px;OVERFLOW:hidden;BORDER-TOP:rgb(204,204,204) 1px dashed;BORDER-RIGHT:rgb(204,204,204) 1px dashed;PADDING-TOP:0.5em">n1 = 3;    % n1 is the number of subjects
design(1,1:n1)       = [0.6 0.9 0.1]; %here we insert our independent variable (behavioral data) in the cfg.design matrix, in this case reaction times of 3 subjects.

cfg.design           = design;
cfg.ivar             = 1; 
 
stat = ft_freqstatistics(cfg, data_brain{:});</pre></div>
<div></div>
<div>where data_brain is a multiple subjects structure in case you're doing this at the second/group level (i.e. correlate a behavioral variable to a neural variable across subjects). Thus, a dummy variable is no longer needed.</div>
<div><br></div>
<blockquote style="BORDER-LEFT:rgb(204,204,204) 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">
<div>
<div dir="ltr">
<div>
<p style="LINE-HEIGHT:normal;MARGIN:0px;MIN-HEIGHT:14px"><font color="#000000" size="4" face="times new roman, serif">Alternatively, is there a way to get, for every individual in the grand average, one value representing the average power for, e.g., 300-600ms in the 4-7Hz range?</font></p></div></div></div></blockquote>
<div><br></div>
<div>You may want to use ft_freqdescriptives for that, per subject.</div>
<div><br></div>
<div>Best, Arjen</div>
<blockquote style="BORDER-LEFT:rgb(204,204,204) 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">
<div>
<div dir="ltr"><span><font color="#888888">
<div>
<div dir="ltr">
<div><font color="#000000" size="4" face="times new roman, serif"></font></div></div></div></font></span></div></div></blockquote></div><br></div></div></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" rel="noreferrer" target="_blank">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><font face="'times new roman', serif">Kaitlyn Litcofsky</font><div><font face="'times new roman', serif">Graduate Student, Cognitive Psychology</font></div><div><font face="times new roman, serif">006 Moore Building</font></div><div><font face="'times new roman', serif">Pennsylvania State University</font></div><div><font face="'times new roman', serif">University Park, PA 16802</font></div><div><font face="'times new roman', serif">Email: <a href="mailto:kal378@psu.edu" target="_blank">kal378@psu.edu</a></font></div></div></div>
</div>