[FieldTrip] Error using ft_clusterplot: unsupported dimord unknown_freq_time

Sebastian Sauppe sauppe.s at gmail.com
Mon Jul 16 00:09:30 CEST 2018


Dear FieldTrip list users,

I am trying to analyze a between-subjects experiment with cluster-based permutation tests. In setting up the tests, I followed the tutorial on the FieldTrip site (http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_freq#between-trial_experiments <http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_freq#between-trial_experiments>).

However, when I try to plot the results, I get the error „Error using ft_clusterplot (line 161) unsupported dimord unknown_freq_time“. I am very new to FieldTrip and its probably a rookie mistake that I am making but I’d be very grateful if someone who knows could point out what I might be doing wrong here.

Here is the code:

%% run cluster-based permutation test
 
% set up cfg for ft_freqstatistics
cfg = [];
cfg.channel          = 'all'; 
cfg.latency          = 'all';
cfg.frequency        = 'all';
cfg.method           = 'montecarlo';
cfg.statistic        = 'ft_statfun_indepsamplesT';
cfg.correctm         = 'cluster';
cfg.clusteralpha     = 0.05;
cfg.clusterstatistic = 'maxsum';
cfg.minnbchan        = 2;
cfg.tail             = 0;
cfg.clustertail      = 0;
cfg.alpha            = 0.025;
cfg.numrandomization = 20; % to make it quick
% prepare_neighbours determines what electrodes may form clusters
cfg_neighb.method    = 'distance';
cfg.neighbours       = ft_prepare_neighbours(cfg_neighb, freq_IPFV);
cfg.spmversion       = 'spm12';
 
design = zeros(1,size(freq_IPFV.powspctrm,1) + size(freq_PFV.powspctrm,1));
design(1,1:size(freq_IPFV.powspctrm,1)) = 1;
design(1,(size(freq_IPFV.powspctrm,1)+1):(size(freq_IPFV.powspctrm,1)+...
  size(freq_PFV.powspctrm,1))) = 2;
 
cfg.design           = design;
cfg.ivar             = 1;
 
[stat] = ft_freqstatistics(cfg, freq_IPFV, freq_PFV);

%% plot the results
 
cfg = []; 
cfg.keeptrials = 'no';
freqdesc_IPFV = ft_freqdescriptives(cfg, freq_IPFV);
freqdesc_PFV  = ft_freqdescriptives(cfg, freq_PFV);
 
stat.raweffect = freqdesc_IPFV.powspctrm - freqdesc_PFV.powspctrm;
 
cfg = [];
cfg.alpha  = 0.025;
cfg.parameter = 'raweffect';
cfg.zlim   = [-1e-27 1e-27];
cfg.layout = 'GSN-HydroCel-129.sfp';
layout = ft_prepare_layout(cfg);
cfg.layout = layout;
ft_clusterplot(cfg, stat);

Kind regards,
Sebastian

-----------
Dr. Sebastian Sauppe
Department of Comparative Linguistics, University of Zurich
Homepage: https://sites.google.com/site/sauppes/ <https://sites.google.com/site/sauppes/>
Twitter: @SebastianSauppe <https://twitter.com/SebastianSauppe>
Google Scholar Citations: https://scholar.google.de/citations?user=wEtciKQAAAAJ <https://scholar.google.de/citations?user=wEtciKQAAAAJ> 
ResearchGate: http://www.researchgate.net/profile/Sebastian_Sauppe <http://www.researchgate.net/profile/Sebastian_Sauppe>
ORCID ID: http://orcid.org/0000-0001-8670-8197 <http://orcid.org/0000-0001-8670-8197>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20180716/2013e04f/attachment-0001.html>


More information about the fieldtrip mailing list