<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 Arjen,</DIV>
<DIV> </DIV>
<DIV>Sorry for the confusion. </DIV>
<DIV> </DIV>
<DIV>The stat.rho matrix is similar to the one I calculated using corr.</DIV>
<DIV> </DIV>
<DIV>My questions is about the permutation method and the correlation matrix after each permutation for calculating cluster distribution. The permutation method seems interacting with correlation (but not with t tests). </DIV>
<DIV> </DIV>
<DIV>Looking forward to your suggestions.</DIV>
<DIV> </DIV>
<DIV>Xiaoming<BR><BR>>>> Arjen Stolk <a.stolk8@gmail.com> 10/19/2015 6:01 PM >>><BR></DIV>
<DIV dir=ltr>Hey Xiaoming,
<DIV><BR></DIV>
<DIV>Not sure if I understand, but shouldn't the directions of the correlations be independent of the scaling of the two variables? Looking at the code of ft_statfun_correlationT it doesn't seem the conversion from correlation to T value (tstat = rho*(sqrt(max(nunits)-2))/sqrt((1-rho^2))) would result in a direction change either. Perhaps you could try to first manually calculate a correlation between signal power and behavioral power, and see whether anything is behaving unexpectedly? </DIV>
<DIV><BR></DIV>
<DIV>Yours,</DIV>
<DIV>Arjen</DIV></DIV>
<DIV class=gmail_extra><BR>
<DIV class=gmail_quote>2015-10-19 14:25 GMT-07:00 Xiaoming Du <SPAN dir=ltr><<A href="mailto:XDu@mprc.umaryland.edu" target=_blank>XDu@mprc.umaryland.edu</A>></SPAN>:<BR>
<BLOCKQUOTE style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class=gmail_quote>
<DIV style="MARGIN: 4px 4px 1px; FONT: 10pt Tahoma">
<DIV>Dear FieldTrip users,</DIV>
<DIV></DIV>
<DIV>This is Xiaoming from University of Maryland Baltimore. My current project requires to calculate behavioral-power correlation across subjects. Similar topic was discussed here early this year. <A href="http://mailman.science.ru.nl/pipermail/fieldtrip/2015-February/008953.html" target=_blank>http://mailman.science.ru.nl/pipermail/fieldtrip/2015-February/008953.html</A></DIV>
<DIV></DIV>
<DIV>According to the suggestions in above mentioned thread, I duplicate my power dataset and replace the power values at each time-frequency point with behavioral data. Therefore, those two datasets have same structure and dimension. I used the following script to test if there are significant clusters of correlations.</DIV>
<DIV></DIV>
<DIV>cfg = [];<BR>cfg.parameter = 'powspctrm';<BR>cfg.method = 'montecarlo';<BR>cfg.statistic = 'ft_statfun_correlationT';<BR>...</DIV>
<DIV>etc</DIV>
<DIV>...<BR>design = zeros(2, n1 * 2); % n1 is the number of subjects.<BR>design(1,1:n1) = 1;<BR>design(1,(n1 + 1):(n1 * 2)) = 2;<BR>design(2, :) = [[1:n1 ] [1 : n1]];<BR>cfg.design = design;</DIV>
<DIV><BR>cfg.ivar = 1;<BR>cfg.uvar = 2;<BR>stat = ft_freqstatistics(cfg, dataBeh{:}, dataDX1{:});</DIV>
<DIV></DIV>
<DIV></DIV>
<DIV>However, it seems when each time the design matrix is permuted, FieldTrip is using the same method as for 'ft_statfun_depsamplesT', meaning cfg.uvar remains the same while cfg.ivar (1 or 2) is randomly assigned to each subject in design matrix. Although I confirmed this by uncommenting line 313 (i.e., tmpdesign = design(:,resample(i,:))) in ft_statistics_montecarlo.m which allows to display the permuted design matrix in command line, please correct me if this is not the case. </DIV>
<DIV></DIV>
<DIV>In my mind, this kind of permutation will cause trouble when dealing with correlation. For example, in my case, the behavioral data and power data have different scales. The power data are much larger than behavioral data in general. When assigning behavioral data into power group or vice versa, it will induce huge negative correlations between power and behavioral measurement. Therefore, no negative clusters will survive from permutation test. </DIV>
<DIV></DIV>
<DIV>Please let me know if I have mis-understanding or if I did anything wrong. Any suggestions will be highly appreciated!</DIV>
<DIV></DIV>
<DIV>Thanks.</DIV><SPAN class=HOEnZb><FONT color=#888888>
<DIV></DIV>
<DIV>Xiaoming </DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV></FONT></SPAN></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></DIV></BODY></HTML>