[FieldTrip] source statistics - spm_bwlabel error
Julian Keil
julian.keil at gmail.com
Wed May 24 16:42:26 CEST 2017
Dear Malgorzata,
from a quick glance, it appears that in the call to spm_bwlabel "numdims" should be 3 to give you 2*numdims = 6.
So, could you check what numdims is in your case?
I suspect that you have 4-dimensional data (time by 3 spatial dimensions), so it might help to check where the dimensions are coming from and what happens if you average over time.
Good luck,
Julian
Am 24.05.2017 um 16:34 schrieb Malgorzata Wislowska:
> Dear FT-community,
>
>
> when calculating cluster permutation statistics on the source level, I receive the following error:
> Error using spm_bwlabel
> spm_bwlabel: CONN must be 6, 18 or 26
>
> Error in clusterstat (line 319)
> [negclusrnd, negrndnum] = spm_bwlabel(tmp, 2*numdims); % use spm_bwlabel for 2D/3D to avoid usage of image toolbox
>
> Error in ft_statistics_montecarlo (line 347)
> [stat, cfg] = clusterstat(cfg, statrand, statobs);
>
> Error in ft_sourcestatistics (line 218)
> [stat, cfg] = statmethod(cfg, dat, design);
>
> I used MNE method for the inverse problem. I have 8196 grid points 1555 time points.
> But the error occurs also when I average across the time.
>
> Here is my configuration structure for the source analysis:
>
> design = zeros(2, nb_of_sbj*2);
> design(1,:) = [1:nb_of_sbj 1:nb_of_sbj];
> design(2,:) = [ones(1,nb_of_sbj) ones(1,nb_of_sbj)*2];
>
> cfg = [];
> cfg.method = 'montecarlo';
> cfg.statistic = 'ft_statfun_depsamplesT';
> cfg.parameter = 'pow';
> cfg.correctm = 'cluster';
> cfg.clusterstatistic = 'maxsum';
> cfg.design = design;
> cfg.ivar = 2;
> cfg.uvar = 1;
> cfg.numrandomization = 5000;
> cfg.tail = 0;
> cfg.alpha = 0.025;
>
> [stat] = ft_sourcestatistics(cfg,avg_con_sel{:},avg_incon_sel{:});
>
> As far as I can see somebody had asked the same question last year, but the post doesn't seem to have been addressed:
> https://mailman.science.ru.nl/pipermail/fieldtrip/2016-August/010762.html
>
>
> Thank you for your help in advance.
>
> Best regards,
> Malgorzata Wislowska,
> University of Salzburg
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20170524/f04e3d5d/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20170524/f04e3d5d/attachment-0002.sig>
More information about the fieldtrip
mailing list