Error in timelockstatistics

Nathan Weisz nathanweisz at MAC.COM
Thu May 13 10:21:45 CEST 2010


Dear Allen,

you need bwlabeln anyhow, no matter how you want to cluster (the function can cluster in n-dimensions). so getting the Image Processing Toolbox may be a good investment if you decide to use fieldtrip statistics in future.

an -untested- alternative may be to use the octave version of bwlabeln. usually the code is very compatible to matlab, i.e. if it does not run out-of-the-box it usually just needs a little tweaking. however it may be a lot slower.
http://users.powernet.co.uk/kienzle/octave/matcompat/scripts/image/bwlabel.m
http://www.gnu.org/software/octave/index.html

good luck,
nathan


On 13.05.2010, at 00:44, Allen Ardestani wrote:

> Hi everyone,
> I am having some difficulty using the cluster-based permutations in both time and frequency domains.  I have just 8 channels of discrete LFP positions, so I thought it may be problematic to cluster them together in space.  I therefore first tried clustering only in time (ERP) or time-frequency (ERS/ERD) by using a single channel.  I used  [stat] = ft_timelockstatistics(cfg, ave_spatial, ave_non_spatial) with the following cfg:
>  
> method: 'montecarlo'
> statistic: 'indepsamplesT'
> correctm: 'cluster'
> clusteralpha: 0.0500
> clusterstatistic: 'maxsum'
> tail: 0
> clustertail: 0
> alpha: 0.0250
> numrandomization: 100
> design: [1x267 double]
> channel: 'F1'
> minnbchan: 0
> layout: 'layout.mat'
> ivar: 1
>  
>  
> I get the following error message:
>  
> ??? Undefined function or method 'bwlabeln' for input arguments of type 'double'.
>  
> Error in ==> findcluster at 89
>   [labelmat(spatdimlev, :, :), num] = bwlabeln(reshape(onoff(spatdimlev, :, :), nfreq, ntime), 4);
>  
> Error in ==> clusterstat at 194
>       posclusobs = findcluster(reshape(postailobs, [cfg.dim,1]),channeighbstructmat,cfg.minnbchan);
>  
> Error in ==> statistics_montecarlo at 321
>   [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 96
> [stat, cfg] = statistics_wrapper(cfg, varargin{:});
>  
>  
> I’m assuming that part of the problem is that I don’t have the Image Processing Toolbox, but is there a way to specify to not cluster across channels?  I’m a new user, so any advice is much appreciated.
>  
> Thanks in advance!
> __________________________________________________________________________________
> Allen Ardestani    Email: aardesta at ucla.edu
> Phone: (310) 825-5528
> Medical Scientist Training Program
> David Geffen School of Medicine at UCLA
> Semel Institute for Neuroscience and Human Behavior
> 760 Westwood Plaza
> Los Angeles, CA 90095-1759
> USA
>  
> ----------------------------------
> 
> The aim of this list is to facilitate the discussion between users of the FieldTrip toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis.
> 
> http://listserv.surfnet.nl/archives/fieldtrip.html
> 
> http://www.ru.nl/fcdonders/fieldtrip/
> 





----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20100513/f47bfa0a/attachment-0002.html>


More information about the fieldtrip mailing list