using cfg.correctm = 'cluster' and related memory issues.
Eric Maris
maris at NICI.RU.NL
Mon Jul 2 21:56:58 CEST 2007
Dear Sameer,
> I am running into memory issues while trying to do non-parametric
> statistical testing for coherence differences for my Neuromag 306 data.
>
> The statement causing overflow is line 277 in statistics_montecarlo:
> statrand = zeros(size(statobs,1), size(res,1));
> This would be a matrix of size 50631525 X 100 corresponding to some 40 GB!
> (Am I correct in assuming that the 100 is from cfg.numrandomization)?
>
> This statement is evoked if cfg.correctm = 'cluster';
> I could use cfg.correctm = max but I dont think this will do the right
> analysis.
>
> The one thing I can think of is changing cfg.channelcmb to try and reduce
> the number of combinations tried (but is not very preferable atleast right
> now). Is there anything else that comes to mind?
>
> The cfg I am using and other info is added below.
Using Fieldtrip for nonparametric statistical testing of the complete set of
between-channel coherences is one step too far. As a first step, one should
start comparing coherences with a single reference channel. I have described
this methodology in a recent paper in the Journal of Neuroscience Methods
(Maris et al., 2007).
Unfortunately, there is not a tutorial for this type of analysis, and the
help documentation does not bring you very far. This job is on my list, but
I have not yet found the time.
The bottom line is that testing coherence differences involving a reference
channel is certainly feasible, but the documentation is lacking,
Kind regards,
Eric Maris
dr. Eric Maris
NICI/Biological Psychology and
F.C. Donders Center for Cognitive NeuroImaging
University of Nijmegen
P.O. Box 9104
6500 HE Nijmegen
The Netherlands
T:+31 24 3612651 (NICI)
T:+31 24 3610754 (FCDC)
F:+31 24 3616066 (NICI)
E: maris at nici.ru.nl
MSc Cognitive Neuroscience :www.ru.nl/master/cns/
>
> Thank you for your time and help.
> sameer
>
> >>cfg = [];
> cfg.channelcmb = {'MEG' 'MEG'};
> cfg.method = 'montecarlo';
> cfg.statistic = 'indepsamplesZcoh';
> cfg.clusteralpha = 0.05;
> cfg.clusterstatistic = 'maxsum';
> cfg.clusterthreshold = 'nonparametric';
> cfg.minnbchan = 2;
> cfg.tail = 0;
> cfg.clustertail = 0;
> cfg.alpha = 0.05;
> cfg.numrandomization = 100; % make it larger for better testing
> cfg.precision = 'single'; % experimenting to save memory
> cfg.label = CSD_LL_200_400.label ;
> cfg.channelcmb = CSD_LL_200_400.labelcmb;
>
>
> [statistics] = freqstatistics(cfg, CSD_LL_200_400 , CSD_RR_200_400);
>
> Note: I use Cross Spectral density instead of coherence as coherence does
> not keep trials.
>
> At the debug prompt after the error I have:
>
> K>> whos
> Name Size Bytes Class
> Attributes
>
> Nrand 1x1 8 double
> cfg 1x1 60159588 struct
> dat 326655x127 331881480 single
> complex
> design 1x127 1016 double
> res 100x1x127 101600 double
> statfull 1x1 405052324 struct
> statfun 1x1 16 function_handle
> statobs 50631525x1 405052200 double
> time_eval 1x1 8 double
> time_pre 1x1 8 double
>
> ----------------------------------
> 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/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/fcdonders/fieldtrip.
More information about the fieldtrip
mailing list