<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div class="" style="word-wrap: break-word; line-break: after-white-space;">
<div dir="auto" class="" style="word-wrap: break-word; line-break: after-white-space;">
Dear Fieldtrip Community,
<div class=""><br class="">
</div>
<div class="">I would like to compare time-frequency data between 2 conditions: Correct and Incorrect movements. For this purpose, I performed time-frequency analyses (Morlet wavelet) and cluster based permutation tests. The scripts run fine but I do have two
 more general questions regarding the analyses. </div>
<div class=""><br class="">
</div>
<div class="">1) For each subject, the 2 conditions have a different amount of trials for the time-frequency analyses. In some cases, the differences are relatively great (e.g. 30 trials vs. 140 trials). At the moment, I am taking the average from these two
 conditions (time-frequency data) for each subject and using these for the group level cluster based permutation tests. Based on the great differences in the number of trials, I am not sure if this is a valid approach. I considered doing bootstrapping of the
 trials to have the same number of trials for the time-frequency analyses (I did the same for the behavioral data). However, I did not find the option in fiedltrip and I would have do it manually in a loop. Does anyone have experiences with dealing with such
 an issue?</div>
<div class=""><br class="">
</div>
<div class="">2) Before the group level cluster based permutation test, I am a-priori defining a time and frequency window (theta, alpha, beta, gamma) of interest using ft_select data. The cluster based permutation test reveals differences between the 2 conditions
 for some frequency bands (I attached the code and the cluster plot for the gamma band which seems to comprise frontal and parietal regions). </div>
<div class=""><br class="">
</div>
<div class="">As documented in the tutorials, it is difficult to make inferences about the spatial locality of this effect with this test (<a href="https://www.fieldtriptoolbox.org/faq/how_not_to_interpret_results_from_a_cluster-based_permutation_test/" class="">https://www.fieldtriptoolbox.org/faq/how_not_to_interpret_results_from_a_cluster-based_permutation_test/</a>).
 I was wondering on how to interpret and present the results with regard to the spatial domain. Does anyone recommend an additional test to strengthen the analyses in the spatial domain (e.g. source localization)? Is there a common/good approach following the
 cluster based permutation test?</div>
<div class=""><br class="">
</div>
<div class="">Any advice would be appreciated.</div>
<div class=""><br class="">
</div>
<div class="">Best, Patrick</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""></div>
</div>
</div>
<div class="" style="word-wrap: break-word; line-break: after-white-space;">
<div dir="auto" class="" style="word-wrap: break-word; line-break: after-white-space;">
<div class=""></div>
<div class=""><br class="">
</div>
<div class="">
<div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier; color: rgb(34, 139, 34);">
%%</div>
<div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">
cfg = [];</div>
<div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier; color: rgb(34, 139, 34);">
% cfg.channel          = {'Fz','F1','F2','F3','F4','F5','F6','F7','F8','Fc1','Fc2','Fc3','Fc4','Fc5','Fc6','Fc7','Fc8','Af3','Afz','Af4','Af7','Af8'};</div>
<div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">
cfg.parameter        = <span class="" style="color: rgb(160, 32, 240);">'powspctrm'</span>;</div>
<div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">
cfg.method           = <span class="" style="color: rgb(160, 32, 240);">'montecarlo'</span>;</div>
<div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">
cfg.statistic        = <span class="" style="color: rgb(160, 32, 240);">'ft_statfun_depsamplesT'</span>;</div>
<div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">
cfg.correctm         = <span class="" style="color: rgb(160, 32, 240);">'cluster'</span>;</div>
<div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">
cfg.clusteralpha     = 0.05;</div>
<div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">
cfg.clusterstatistic = <span class="" style="color: rgb(160, 32, 240);">'maxsum'</span>;</div>
<div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">
cfg.minnbchan        = 2;</div>
<div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">
cfg.tail             = 0;</div>
<div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">
cfg.clustertail      = 0;</div>
<div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">
cfg.alpha            = 0.05;</div>
<div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">
cfg.numrandomization = 1000;</div>
<div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">
cfg.neighbours       = neighbours;</div>
<div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier; min-height: 12px;" class="">
 <br class="x_webkit-block-placeholder">
</div>
<div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier; min-height: 12px;" class="">
 <br class="x_webkit-block-placeholder">
</div>
<div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">
subj = 25;</div>
<div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">
design = zeros(2,2*subj);</div>
<div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">
<span class="" style="color: rgb(0, 0, 255);">for</span> i = 1:subj</div>
<div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">
  design(1,i) = i;</div>
<div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier; color: rgb(0, 0, 255);">
end</div>
<div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">
<span class="" style="color: rgb(0, 0, 255);">for</span> i = 1:subj</div>
<div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">
  design(1,subj+i) = i;</div>
<div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier; color: rgb(0, 0, 255);">
end</div>
<div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">
design(2,1:subj)        = 1;</div>
<div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">
design(2,subj+1:2*subj) = 2;</div>
<div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier; min-height: 12px;" class="">
 <br class="x_webkit-block-placeholder">
</div>
<div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">
cfg.design   = design;</div>
<div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">
cfg.uvar     = 1;</div>
<div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">
cfg.ivar     = 2;</div>
<div style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier; min-height: 12px;" class="">
 <br class="x_webkit-block-placeholder">
</div>
<div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">
[stat_beta] = ft_freqstatistics(cfg, grandavg_single_1_beta, grandavg_single_0_beta);</div>
<div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">
[stat_theta] = ft_freqstatistics(cfg, grandavg_single_1_theta, grandavg_single_0_theta);</div>
<div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">
[stat_alpha] = ft_freqstatistics(cfg, grandavg_single_1_alpha, grandavg_single_0_alpha);</div>
<div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">
[stat_gamma] = ft_freqstatistics(cfg, grandavg_single_1_gamma, grandavg_single_0_gamma);</div>
<div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">
<br class="">
</div>
<div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">
<br class="">
</div>
<div class="" style="margin: 0px; font-size: 10px; line-height: normal; font-family: Courier;">
<img apple-inline="yes" id="CB43D867-2EA0-4077-AAA3-473A3DB0748F" src="cid:D00B1A08-AD26-4508-B5A5-5ADDB39160E8@w2k.sport.uni-freiburg.de" class=""></div>
</div>
</div>
</div>
<div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<b class="">Patrick Wiegel</b><br class="">
<font color="#680823" class="">Department of Sport and Sport Science</font>
<div class=""><br class="">
University of Freiburg <br class="">
Sandfangweg 4<br class="">
79117 Freiburg i. Br . <br class="">
<br class="">
<div class="">phone: +49 (0)761/ 203-4550<br class="">
<a href="mailto:patrick.wiegel@sport.uni-freiburg.de" class="">email: patrick.wiegel@sport.uni-freiburg.de</a><br class="">
web: www.sport.uni-freiburg.de</div>
</div>
</div>
</div>
<br class="">
</body>
</html>