dealing with missing channels in group cluster analysis

Jed Meltzer jedmeltzer at YAHOO.COM
Fri Dec 19 21:36:44 CET 2008


I'm interested in using the cluster-based randomization statistical functions in fieldtrip, on EEG data that I've already mostly processed using other software.  I have power spectra from multiple conditions, already averaged within subjects, and I want to do cross-subject comparisons, i.e. a paired t-test with two conditions in each subject.  I think for this I could use "timelockstatistics" and just trick the software into thinking that the input is timepoints rather than frequency components (this is from windowed fourier spectra, with no time dimension).  If anyone sees any problem with that, please let me know, but otherwise I'll move on to my problem...

So I'm trying to put my data into the same format as that used in the tutorial example.  I have 24 subjects, 34 electrodes, and 257 frequency points, so it looks like I need to contstruct for each condition a data structure with a field like:

data.individual:  24x34x257

Now, my problem is that in a few subjects there are some missing channels.  Some channels in the course of the experiment are deemed unacceptably noisy and excluded from analysis.  This is all kept track of in my processing schemes, but how can I deal with it here, when I need to fill in the full array?  Normally I would fill in the missing space with NaN, but I'm not sure that the cluster analysis programs in field trip can deal with NaN.  Maybe it wouldn't be such a big deal to change them?  I've thought about doing it myself, but I'm afraid I would miss something due to unfamiliarity with the code.  But it seems like functions such as statfun_depsamplesT.m (which I'm using) call matlab functions like mean() and var(), when they could easily call nanmean() and nanvar() (from the statistics toolbox) instead.  One would have to check for NaN data and adjust the degrees of freedom as well.

Do you think there's any hope for this?  Or would you suggest a different approach?  Just please don't say "interpolate the missing channels" or I will have to bang my head against the wall...

Jed A. Meltzer, Ph.D.
Postdoctoral Fellow, Language Section, Voice, Speech, and Language Branch
National Institute on Deafness and Other Communication Disorders, National Institutes of Health
10 Center Drive, Building 10, Rm 5C410, Bethesda, MD 20892-1065
301-435-5144   meltzerj at

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 and

More information about the fieldtrip mailing list