<HTML><HEAD>
<META content="text/html; charset=iso-8859-15" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.23588"></HEAD>
<BODY 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.stolk8@gmail.com> 5/2/2016 4:41 PM >>><BR></DIV>
<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">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></BODY></HTML>