[FieldTrip] Problem with clustering across electrode neighbours

Eelke Spaak eelke.spaak at donders.ru.nl
Thu Sep 13 12:55:34 CEST 2012


Dear Duncan,

Jörn can correct me if I'm wrong, but I think it is sufficient to write

cfg = [];
cfg.method = 'template';
cfg.template = 'EEG1010_neighb.mat';
neighbours = ft_prepare_neighbours(cfg);

if you want to use the neighbourhood structure template. So,
specifying all those other options might have confused
ft_prepare_neighbours.

Best,
Eelke

On 13 September 2012 12:46, Duncan Astle <Duncan.Astle at mrc-cbu.cam.ac.uk> wrote:
> Dear Fieldtrippers,
>
>
>
> I am rather new to this, but am attempting to do some cluster stats on my
> ERP sensor level data. It is working well, and I can cluster across time,
> but I can’t get it to cluster across electrode locations. I think it is
> because of a mistake that I am making in my ‘neighbours’ file, although it
> looks fine when I inspect it. This is the error message that I get:
>
>
>
> ??? Cell contents reference from a non-cell array object.
>
>
>
> Error in ==> clusterstat>makechanneighbstructmat at 520
>
>     [seld] = match_str(cfg.channel, cfg.neighbours{chan}.label);
>
>
>
> Error in ==> clusterstat at 60
>
>     channeighbstructmat = makechanneighbstructmat(cfg);
>
>
>
> Error in ==> statistics_montecarlo at 322
>
>   [stat, cfg] = clusterstat(cfg, statrand, statobs,'issource',issource);
>
>
>
> Error in ==> statistics_wrapper at 285
>
>     [stat, cfg] = statmethod(cfg, dat, cfg.design, 'issource',issource);
>
>
>
> Error in ==> ft_timelockstatistics at 119
>
> [stat, cfg] = statistics_wrapper(cfg, varargin{:});
>
>
>
> Can anyone spot what I am doing wrong?
>
>
>
> This is how I make my neighbour file:
>
>
>
> cfg = [];
>
> cfg.layout      = 'EEG1010.lay'; % try 'distance' as well
>
> cfg.feedback    = 'yes'; % show a neighbour plot
>
> cfg.method      = 'template';
>
> cfg.neighbourdist = 'number';
>
> cfg.template      = 'EEG1010_neighb.mat'
>
> cfg.channel       = 'all'
>
> cfg.feedback      = 'yes';
>
> neighbours      = ft_prepare_neighbours(cfg, Load5Hard); % define
> neighbouring channels
>
>
>
> This is how I then try the stats:
>
>
>
>     cfg = [];
>
>     cfg.channel     = 'all';
>
>     cfg.latency     = [0.1 1.3];
>
>     cfg.avgovertime = 'no';
>
>     cfg.avgoverchannel = 'no';
>
>     cfg.parameter   = 'individual';
>
>     cfg.method      = 'montecarlo';
>
>     cfg.statistic   = 'depsamplesT'
>
>     cfg.alpha       = 0.05;
>
>     cfg.correctm    = 'cluster';
>
>     cfg.correcttail = 'prob';
>
>     cfg.numrandomization = 1000;
>
>     cfg.feedback    = 'yes'; % show a neighbour plot
>
>     cfg.neighbours  = neighbours;
>
>     %cfg.minnbchan        = 2;
>
>     cfg.clusterstatistic = 'maxsum';
>
>     cfg.clusterthreshold = 'nonparametric';
>
>     cfg.clusteralpha     = 0.01;
>
>     cfg.clustercritval   = 0.06;
>
>    % cfg.clustertail      = 0;
>
>     cfg.tail = 0;
>
>     Nsub = 19;
>
>     cfg.design(1,1:2*Nsub)  = [ones(1,Nsub) 2*ones(1,Nsub)];
>
>     cfg.design(2,1:2*Nsub)  = [1:Nsub 1:Nsub];
>
>     cfg.ivar                = 1; % the 1st row in cfg.design contains the
> independent variable
>
>     cfg.uvar                = 2; % the 2nd row in cfg.design contains the
> subject number
>
>
>
>
>
> [stat] = ft_timelockstatistics(cfg, Load3Hard, Load3Easy)
>
>
>
> Any suggestions very gratefully received.
>
>
>
> Thanks,
>
> Duncan
>
> ________________________________________________
>
> Dr. Duncan Astle,
>
> Programme Leader Track,
>
> British Academy Research Fellow,
>
> MRC Cognition and Brain Sciences Unit,
>
> Chaucer Road,
>
> Cambridge.
>
> Duncan.Astle at mrc-cbu.cam.ac.uk
>
>
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip




More information about the fieldtrip mailing list