<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>Thanks Stephen, Arjen. </DIV>
<DIV> </DIV>
<DIV>I am using : MATLAB Version: 8.1.0.604 (R2013a) and fieldtrip-20151111. </DIV>
<DIV> </DIV>
<DIV>I attached the 'testdata.mat' which has cfg and data_brain. I also attached the error message I got from Matlab command window. </DIV>
<DIV> </DIV>
<DIV>Looking forward to your feedback!</DIV>
<DIV> </DIV>
<DIV>Best,</DIV>
<DIV>Xiaoming<BR><BR>>>> Arjen Stolk <a.stolk8@gmail.com> 11/12/2015 11:32 AM >>><BR></DIV>
<DIV dir=ltr>Hi Xiaoming,
<DIV><BR></DIV>
<DIV>Sounds like you're using an older version of the function. Did you try updating fieldtrip?</DIV>
<DIV><BR></DIV>
<DIV>Yours,</DIV>
<DIV>Arjen</DIV></DIV>
<DIV class=gmail_extra><BR>
<DIV class=gmail_quote>2015-11-12 7:42 GMT-08:00 Stephen Whitmarsh <SPAN dir=ltr><<A href="mailto:stephen.whitmarsh@ki.se" target=_blank>stephen.whitmarsh@ki.se</A>></SPAN>:<BR>
<BLOCKQUOTE style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class=gmail_quote><U></U><U></U>
<DIV style="MARGIN: 3pt 3pt 0.75pt" lang=EN-GB vlink="purple" link="blue">
<DIV>
<P class=MsoNormal><SPAN style="FONT-FAMILY: 'Calibri',sans-serif; COLOR: #1f497d; FONT-SIZE: 11pt">Dear Xiaoming,<U></U><U></U></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-FAMILY: 'Calibri',sans-serif; COLOR: #1f497d; FONT-SIZE: 11pt">It is working for me, using it in sourcestatistics. Have you checked your design is really only one row? I can't think of anything else.<U></U><U></U></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-FAMILY: 'Calibri',sans-serif; COLOR: #1f497d; FONT-SIZE: 11pt">Cheers,<U></U><U></U></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-FAMILY: 'Calibri',sans-serif; COLOR: #1f497d; FONT-SIZE: 11pt">S<U></U><U></U></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt"><U></U><U></U></SPAN></P>
<P class=MsoNormal><SPAN style="FONT-FAMILY: 'Calibri',sans-serif; COLOR: #1f497d; FONT-SIZE: 11pt"><U></U><U></U></SPAN></P>
<DIV>
<DIV style="BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0cm; PADDING-LEFT: 0cm; PADDING-RIGHT: 0cm; BORDER-TOP: #e1e1e1 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><B><SPAN style="FONT-FAMILY: 'Calibri',sans-serif; FONT-SIZE: 11pt" lang=EN-US>From:</SPAN></B><SPAN style="FONT-FAMILY: 'Calibri',sans-serif; FONT-SIZE: 11pt" lang=EN-US> <A href="mailto:fieldtrip-bounces@science.ru.nl" target=_blank>fieldtrip-bounces@science.ru.nl</A> [mailto:<A href="mailto:fieldtrip-bounces@science.ru.nl" target=_blank>fieldtrip-bounces@science.ru.nl</A>] <B>On Behalf Of </B>Xiaoming Du<BR><B>Sent:</B> 12 November 2015 16:25<BR><B>To:</B> FieldTrip discussion list <<A href="mailto:fieldtrip@science.ru.nl" target=_blank>fieldtrip@science.ru.nl</A>><BR><B>Subject:</B> Re: [FieldTrip] calculating behavioural-power correlation -- follow-up questions<U></U><U></U></SPAN></P></DIV></DIV>
<DIV>
<DIV class=h5>
<P class=MsoNormal><U></U><U></U></P>
<DIV>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt">Dear Arjen,<U></U><U></U></SPAN></P></DIV>
<DIV>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt"><U></U><U></U></SPAN></P></DIV>
<DIV>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt">Thanks for the updates. <U></U><U></U></SPAN></P></DIV>
<DIV>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt"><U></U><U></U></SPAN></P></DIV>
<DIV>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt">I was trying to run the following code on Fieldtrip website (<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>)<U></U><U></U></SPAN></P></DIV>
<DIV>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt"><U></U><U></U></SPAN></P></DIV>
<DIV>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt">% compute statistics with correlationT<BR>cfg = [];<BR>cfg.statistic = 'ft_statfun_correlationT';<BR>cfg.method = 'montecarlo';<BR>cfg.numrandomization = 1000;<BR><BR>n1 = 3; % n1 is the number of subjects<BR>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.<BR><BR>cfg.design = design;<BR>cfg.ivar = 1; <BR><BR>stat = ft_freqstatistics(cfg, data_brain{:});<U></U><U></U></SPAN></P></DIV>
<DIV>
<DIV><PRE> <U></U><U></U></PRE><PRE> <U></U><U></U></PRE><PRE>However, it gives me this error: <U></U><U></U></PRE></DIV></DIV>
<DIV>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; COLOR: red; FONT-SIZE: 10pt">Error using ft_statfun_correlationT (line 81)<BR>uvar must be specified for dependent samples statistics</SPAN><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt"><U></U><U></U></SPAN></P></DIV>
<DIV>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt"><U></U><U></U></SPAN></P></DIV>
<DIV>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; COLOR: red; FONT-SIZE: 10pt">Error in ft_statistics_montecarlo (line 276)<BR>[statobs, cfg] = statfun(cfg, dat, design);</SPAN><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt"><U></U><U></U></SPAN></P></DIV>
<DIV>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt"><U></U><U></U></SPAN></P></DIV>
<DIV>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; COLOR: red; FONT-SIZE: 10pt">Error in ft_freqstatistics (line 190)<BR>[stat, cfg] = statmethod(cfg, dat, design);</SPAN><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt"><U></U><U></U></SPAN></P></DIV>
<DIV>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt"><U></U><U></U></SPAN></P></DIV>
<DIV>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt"><U></U><U></U></SPAN></P></DIV>
<DIV>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt">Could you provide a sample data_brain, so I can organize my data into same format? Thanks!<U></U><U></U></SPAN></P></DIV>
<DIV>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt"><U></U><U></U></SPAN></P></DIV>
<DIV>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt"><U></U><U></U></SPAN></P></DIV>
<DIV>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt">-Xiaoming<U></U><U></U></SPAN></P></DIV>
<DIV>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt"><U></U><U></U></SPAN></P></DIV>
<DIV>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt"><U></U><U></U></SPAN></P></DIV>
<DIV>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt"><BR><BR></SPAN><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt" lang=SV>>>> Arjen Stolk <</SPAN><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt"><A href="mailto:a.stolk8@gmail.com" target=_blank><SPAN lang=SV>a.stolk8@gmail.com</SPAN></A></SPAN><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt" lang=SV>> 11/7/2015 11:21 PM >>><U></U><U></U></SPAN></P></DIV>
<DIV>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt">Dear participants in the discussion on behavioural-power correlation, and interested folks, <U></U><U></U></SPAN></P>
<DIV>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt"><U></U><U></U></SPAN></P></DIV>
<DIV>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt">Following recent discussion on this mailing list (thanks to Xiaoming Du and Martin Krebber), we have updated ft_statfun_correlationT, a function that can be used for correlating neural and behavioral variables. <U></U><U></U></SPAN></P></DIV>
<DIV>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt"><U></U><U></U></SPAN></P></DIV>
<DIV>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt">Following the update, the correlation values calculated on genuine data have not changed. However, the permutation procedure for calculating the randomization distribution has. Namely, prior to the update the permutation procedure would randomly permute across both the independent (e.g., behavior) and dependent variables (e.g., neural data). This procedure is prone to systematic bias across the data belonging to these variables. And conceptually, as outlined in a new wiki page (see below), the independent and dependent variables should be statistically independent, meaning that any association between these variables should be broken by randomly permuting the values of the independent variable.<U></U><U></U></SPAN></P></DIV>
<DIV>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt"><U></U><U></U></SPAN></P></DIV>
<DIV>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt"><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>?<U></U><U></U></SPAN></P></DIV>
<DIV>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt"><U></U><U></U></SPAN></P></DIV>
<DIV>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt">Those that have been using ft_statfun_correlationT for calculating a randomization distribution using the permutation procedure are advised to update to the latest fieldtrip version and re-calculate those distributions. We are sorry for any inconvenience this may cause. <U></U><U></U></SPAN></P></DIV>
<DIV>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt"><U></U><U></U></SPAN></P></DIV>
<DIV>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt">On a related note, the functionality of ft_statfun_correlationT (under Pearson) is highly similar to that of ft_statfun_indepsamplesregrT. To make the latter function, and others in the statfun suite, more accessible, we would like to forward those interested to the above wiki page where an overview is provided of the different approaches to correlating neural and behavioral variables, with some example fieldtrip code.<U></U><U></U></SPAN></P></DIV>
<DIV>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt"><U></U><U></U></SPAN></P></DIV>
<DIV>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt">Yours, Arjen<U></U><U></U></SPAN></P></DIV>
<DIV>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt">on behalf of Eric Maris and Egbert Hartstra<U></U><U></U></SPAN></P></DIV></DIV>
<DIV>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt"><U></U><U></U></SPAN></P>
<DIV>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt">2015-10-22 2:53 GMT-07:00 Maris, E.G.G. (Eric) <<A href="mailto:e.maris@donders.ru.nl" target=_blank>e.maris@donders.ru.nl</A>>:<U></U><U></U></SPAN></P>
<BLOCKQUOTE style="BORDER-BOTTOM: medium none; BORDER-LEFT: #cccccc 1pt solid; PADDING-BOTTOM: 0cm; PADDING-LEFT: 6pt; PADDING-RIGHT: 0cm; MARGIN-LEFT: 4.8pt; BORDER-TOP: medium none; MARGIN-RIGHT: 0cm; BORDER-RIGHT: medium none; PADDING-TOP: 0cm">
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt">Dear participants in the discussion on behavioural-power correlation,<BR><BR>My name is Eric Maris and have contributed most of the older statfuns (but not ft_statfun_correlationT). Together with Arjen, I will try to resolve some of the issues that have been discussed. Give us some time, and we will return to you via the Discussion List.<BR><BR>best,<BR>Eric<U></U><U></U></SPAN></P>
<DIV>
<DIV>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt"><BR><BR>_______________________________________________<BR>fieldtrip mailing list<BR><A href="mailto:fieldtrip@donders.ru.nl" target=_blank>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><U></U><U></U></SPAN></P></DIV></DIV></BLOCKQUOTE></DIV>
<P style="MARGIN: 0cm 0cm 0pt" class=MsoNormal><SPAN style="FONT-FAMILY: 'Tahoma',sans-serif; FONT-SIZE: 10pt"><U></U><U></U></SPAN></P></DIV></DIV></DIV></DIV></DIV></BLOCKQUOTE></DIV><BR></DIV></BODY></HTML>