[FieldTrip] sourcestatistics spm_bwlabel issue

Es, M.W.J. van (Mats) M.vanEs at donders.ru.nl
Tue Aug 2 13:25:02 CEST 2016


Hi FieldTrippers,

After doing DICS source analysis, I get an error with source statistics:
Error using spm_bwlabel
spm_bwlabel: CONN must be 6, 18 or 26

Error in clusterstat (line 184)
      [posclusobs, posnum] = spm_bwlabel(tmp, 2*numdims);

Error in ft_statistics_montecarlo (line 347)
  [stat, cfg] = clusterstat(cfg, statrand, statobs);

Error in ft_sourcestatistics (line 205)
  [stat, cfg] = statmethod(cfg, dat, design);

Error in source_analysis (line 143)
stat = ft_sourcestatistics(cfg, sourceAct, sourceBl);

I uploaded the data here (https://www.dropbox.com/s/67tocpl685ytf4e/source.mat?dl=0)https://www.dropbox.com/s/67tocpl685ytf4e/source.mat?dl=0https://www.dropbox.com/s/67tocpl685ytf4e/source.mat?dl=0 and this is the code that I am executing:

cfg = [];
cfg.method      = 'montecarlo';
cfg.statistic   = 'ft_statfun_depsamplesT';
cfg.parameter   = 'pow';
cfg.correctm    = 'cluster';
cfg.clusteralpha     = 0.05; % this is the treshold for clustering, not the
% statistical test of the cluster
cfg.clusterstatistic = 'maxsum';
cfg.numrandomization = 1000;
cfg.alpha       = 0.05; % note that this only implies single-sided testing
cfg.tail        = 0;
cfg.clustertail = 0;
cfg.uvar        = 1; % row of design matrix that contains unit variable (in this case: trials)
cfg.ivar        = 2; % row of design matrix that contains independent variable (the conditions)
cfg.dim = [2400 1 1];
design = [1:length(dataAct.trial), 1:length(dataBl.trial); ones(1,length(dataAct.trial)), ones(1,length(dataBl.trial))*2];
cfg.design      = design;
stat = ft_sourcestatistics(cfg, sourceAct, sourceBl);

Any help would be appreciated!

Best,
Mats



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160802/72a5003f/attachment-0001.html>


More information about the fieldtrip mailing list