[FieldTrip] Error using ft_clusterplot (line 153)
Bruno Mansur
brunommansur at gmail.com
Tue Jun 1 16:25:52 CEST 2021
Dear fieldtrip list members,
I'm trying to perform a *cluster based permutation test* on *time-frequency*
data obtained from 'FT_FREQANALYSIS'.
I execute the following command for it:
% 2. Permutation test
cfg = [];
cfg.channel = {'EEG'};
cfg.latency = [0 1.8];
cfg.frequency = 'all';% all frequencies from 2 to 48
cfg.method = 'montecarlo';
cfg.statistic = 'ft_statfun_depsamplesT';
cfg.correctm = 'cluster';
cfg.clusteralpha = 0.05;
cfg.clusterstatistic = 'maxsum';
cfg.minnbchan = 2;
cfg.tail = 0;
cfg.clustertail = 0;
cfg.alpha = 0.05;
cfg.numrandomization = 500;
% 3. Find the channel neighbours for spatial clustering
cfg_neighb.method = 'distance';
cfg.neighbours = ft_prepare_neighbours(cfg_neighb, Tfr_Ogt_ogt{1,1});
ft_neighbourplot(cfg_neighb, Tfr_Ogt_ogt{1:1})% to check neighbours
%------------------------
% 4. Setting the design for the cluster permutation test
Nsubj = 33;
design = zeros(2, Nsubj*2);
design(1,:) = [1:Nsubj 1:Nsubj];
design(2,:) = [ones(1,Nsubj) ones(1,Nsubj)*2];
cfg.design = design;
cfg.uvar = 1;
cfg.ivar = 2;
[stat] = ft_freqstatistics(cfg, Tfr_Ogt_ogt{:}, Tfr_Ogt_low{:});
% ------------------------------------------------------------------------
Until here I get no error messages and the 'stat' variable seems to have
been created (I got 14 negative clusters). Though *when I try plotting it,
I get the following error message*;
Input:
% 5. Plot with ft_clusterplot:
cfg = [];
cfg.alpha = 0.05;
cfg.parameter = 'stat';
cfg.zlim = 'maxmin';
cfg.layout = 'acticap-64ch-standard2.mat';
ft_clusterplot(cfg, stat);
Output:
>> cfg = [];
cfg.alpha = 0.05;
cfg.parameter = 'stat';
cfg.zlim = 'maxmin';
cfg.layout = 'acticap-64ch-standard2.mat';
ft_clusterplot(cfg, stat);
the input is freq data with 64 channels, 48 frequencybins and 37 timebins
reading layout from file acticap-64ch-standard2.mat
the call to "ft_prepare_layout" took 0 seconds and required the additional
allocation of an estimated 0 MB
*Error using ft_clusterplot (line 153)if you input time-frequency data this
only works if either frequency or time is a singleton dimension*
Does anyone know what I can do to plot my data correctly? I would really
appreciate any inputs.
Best,
--
*Bruno*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20210601/4be1b100/attachment.htm>
More information about the fieldtrip
mailing list