<div dir="ltr">Hi Xiaoming,<div><br></div><div>Thanks for clarifying. Could you perhaps provide an (replicable) example on how 'the permutation method interacts with the correlations'?</div><div><br></div><div>Yours,</div><div>Arjen <div class="gmail_extra"><br><div class="gmail_quote">2015-10-19 15:20 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 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"><span class="">
<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 href="mailto:a.stolk8@gmail.com" target="_blank">a.stolk8@gmail.com</a>> 10/19/2015 6:01 PM >>><br>
</div>
</span><div><div class="h5"><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><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" target="_blank">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>
</div></div></div>

</blockquote></div><br></div></div></div>