<div dir="ltr"><div>Dear list members,</div><div><br></div><div>I want to plot the results of a cluster-based permutation test. I know from '<b>neg_clusters_pvals</b>' that there are two negative clusters <b>between -0.2 and 1 sec</b> with a <b>p < 0.025</b>, so they should be marked with an 'X' over the relevant channels in the plot. They do not appear in the plot, though...</div><div><br></div><div>If I use another latency (e.g cfg.latency = [<b>3 4</b>];), the significant clusters get marked correctly (my epochs range from -0.2 to 6 s, so I'm breaking it down into smaller latencies). If I use the same latency ([-0.2 1] and increase the cfg. alpha substantially (e.g cfg.alpha = 0.1) the clusters marks are to be seen in the plot.</div><div><br></div><div>Does anyone know why the significant clusters are not being highlighted in the plot, although they're present in the data and the same code works for other latencies and alpha values?</div><div><br></div><div>Find attached two figures with the outputs using two different latencies. In '-0-2_to_1.jpg' you can see that no electrodes were highlighted and cfg.latency = [<b>-0.2 1</b>];</div><div><br></div><div>In '3_to_4.jpg' you can find many electrodes maked with an '*' and cfg.latency = [<b>3 4</b>];</div><div><br></div><div>I would really appreciate any help,</div><div><br></div><div>Bellow you can find some of my code:</div><div><br></div><div>% 2. Permutation test<br><br>cfg = [];<br>cfg.channel          = {'EEG'};<br>cfg.latency          = [lat_x{1} lat_x{2}];%  [<b>-0.2 1</b>];<br>cfg.frequency        = [lat_x{1} lat_x{2}];% [8 12]; <br>cfg.method           = 'montecarlo';<br>cfg.statistic        = 'ft_statfun_depsamplesT';<br>cfg.correctm         = 'cluster';<br>cfg.clusteralpha     = 0.05;<br>cfg.clusterstatistic = 'maxsum';<br>cfg.minnbchan        = 2;<br>cfg.tail             = 0;<br>cfg.clustertail      = 0;<br>cfg.correcttail      = 'alpha';<br>cfg.alpha            = 0.05;</div><div>cfg.numrandomization = 500;<br>cfg.randomseed       = 2;</div><div><br></div><div><br></div><div>% 5. Plot with ft_topoplotTFR</div><div><br></div><div>cfg = [];<br>cfg.operation = 'subtract';<br>cfg.parameter = 'powspctrm';<br>contrast    = ft_math(cfg, OGT_ogt_avg, OGT_low_avg);<br><br>% define parameters for plotting<br>timestep      = 0.05;<br>sampling_rate = 1/timestep;<br>sample_count  = length(stat.time);% == 25<br>j = [lat_x{1}:timestep:lat_x{2}];% [-0.2:0.05:1]<br>m = [1:timestep*sampling_rate:sample_count];</div><div><br></div><div>% get relevant values NEGATIVE<br>neg_cluster_pvals = [stat.negclusters(:).prob];<br>neg_clust = find(neg_cluster_pvals < 0.025);<br>neg       = ismember(stat.negclusterslabelmat, neg_clust);</div><div><br></div><div>[i1,i2] = match_str(contrast.label, stat.label);</div><div><br></div><div><b>Then I try to plot my results for every 0.05 s:</b><br></div><div><br></div><div>figure;<br>for k = 1:length(m)-1%<br>    subplot(4,6,k);<br>    cfg            = [];<br>    cfg.xlim       = [j(k) j(k+1)];<br>    <br>    if isempty(stat.negclusters) == 0% If there are neg clusters<br>        neg_int        = zeros(numel(contrast.label),1);<br>        neg_int(i1)    = all(neg(i2, m(k):m(k+1)), 2); <br>    else<br>        % Do nothing<br>    end<br>    <br>    if isempty(stat.posclusters) == 0% If there are pos clusters<br>        pos_int        = zeros(numel(contrast.label),1);<br>        pos_int(i1)    = all(pos(i2, m(k):m(k+1)), 2);<br>    else<br>        % Do nothing<br>    end<br>    cfg.highlight  = 'on';<br>    if isempty(stat.negclusters) == 0 & isempty(stat.posclusters) == 0% If there are neg and pos clusters<br>        cfg.highlightchannel = find(pos_int | neg_int);<br>    elseif isempty(stat.negclusters) == 0 & isempty(stat.posclusters) == 1% If there are neg clusters<br>        cfg.highlightchannel = find(neg_int);<br>    elseif isempty(stat.negclusters) == 1 & isempty(stat.posclusters) == 0% If there are pos clusters<br>        cfg.highlightchannel = find(pos_int);<br>    else% If there are NONE<br>        disp('Nothing here...')<br>    end<br>    cfg.comment    = 'xlim';<br>    cfg.commentpos = 'title';<br>    cfg.layout     = 'acticap-64ch-standard2.mat';<br>    cfg.title      = freqs_x{1};<br>    <b>ft_topoplotTFR</b>(cfg, contrast);<br>end</div><div><br></div><div><br>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><b>Bruno </b><br></div></div></div></div>