<div dir="ltr"><div>Dear fieldtrip list members,</div><div><br></div><div>I'm trying to perform a <b>cluster based permutation test</b> on <b>time-frequency</b> data obtained from 'FT_FREQANALYSIS'.</div><div><br></div><div>I execute the following command for it:</div><div><br></div><div>% 2. Permutation test<br><br>cfg = [];<br>cfg.channel           = {'EEG'};<br>cfg.latency            = [0 1.8];<br>cfg.frequency        = 'all';% all frequencies from 2 to 48<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.alpha                = 0.05;<br>cfg.numrandomization = 500;<br><br>% 3. Find the channel neighbours for spatial clustering<br><br>cfg_neighb.method    = 'distance';<br>cfg.neighbours       = ft_prepare_neighbours(cfg_neighb, Tfr_Ogt_ogt{1,1});<br><br>ft_neighbourplot(cfg_neighb, Tfr_Ogt_ogt{1:1})% to check neighbours<br><br>%------------------------<br><br>% 4. Setting the design for the cluster permutation test<br><br>Nsubj  = 33;<br>design = zeros(2, Nsubj*2);<br>design(1,:) = [1:Nsubj 1:Nsubj];<br>design(2,:) = [ones(1,Nsubj) ones(1,Nsubj)*2];<br><br>cfg.design = design;<br>cfg.uvar   = 1;<br>cfg.ivar   = 2;<br><br>[stat] = ft_freqstatistics(cfg, Tfr_Ogt_ogt{:}, Tfr_Ogt_low{:});<br><br>% ------------------------------------------------------------------------</div><div><br></div><div>Until here I get no error messages and the 'stat' variable seems to have been created (I got 14 negative clusters). Though <b>when I try plotting it, I get the following error message</b>;<br></div><div><br></div><div>Input:<br>% 5. Plot with ft_clusterplot:<br><br>cfg = [];<br>cfg.alpha  = 0.05;<br>cfg.parameter = 'stat';<br>cfg.zlim   = 'maxmin';<br>cfg.layout = 'acticap-64ch-standard2.mat';<br>ft_clusterplot(cfg, stat);</div><div><br></div><div>Output:</div><div><br></div><div>>> cfg = [];<br>cfg.alpha  = 0.05;<br>cfg.parameter = 'stat';<br>cfg.zlim   = 'maxmin';<br>cfg.layout = 'acticap-64ch-standard2.mat';<br>ft_clusterplot(cfg, stat);<br>the input is freq data with 64 channels, 48 frequencybins and 37 timebins<br>reading layout from file acticap-64ch-standard2.mat<br>the call to "ft_prepare_layout" took 0 seconds and required the additional allocation of an estimated 0 MB<br><b>Error using ft_clusterplot (line 153)<br>if you input time-frequency data this only works if either frequency or time is a singleton dimension</b></div><div><br></div><div>Does anyone know what I can do to plot my data correctly? I would really appreciate any inputs.<br></div><div><br></div><div>Best,</div><div><br>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><b>Bruno</b></div></div></div></div>