Clusterplot not highlighting clusters & average layout file

Ingrid Nieuwenhuis ingrid.nieuwenhuis at DONDERS.RU.NL
Wed Jul 8 16:15:12 CEST 2009


Dear Manish,

> Thanks for your quick reply. I wanted to run freqstats separately on 
> each frequency, since I don't have precise temporal resolution in my 
> data (no events). Hence I need to run stats on Freq-Space 
> representations and not on TFR. Since clusterplot was not handling 
> this case, probably because it is made to search across time and space 
> for a given frequency, I ran freqstats/clusterplot separately for each 
> frequency.

Aha, so you have frequency and channels, no time. Clusterplot can handle
both data with and without time dimension (it looks for a .time field in the
data). It cannot handle data with multiple frequency dimensions, so
therefore you have to avgoverfreq (in revision 1.8 of clusterplot from May
22nd, I added a check for appropriateness of the data, see line 58). So
depending on the hypothesis you want to test and your data you can either
avgoverfreq and use clusterplot (as I said before usually appropriate for
the lower frequencies because of well defined narrow bands, but again it
depends on the research questions you have), or use multiplot. But because
you have no time dimension you should use multiplotER (not multiplotTFR),
with xparam = 'freq', zparam = 'stat', and maskparameter = 'mask'. Then the
frequencies that are in the cluster are marked with a box. I don't know if
it all works properly, I recall there were some problems with the masking
options in multiplotER. Let me know if you need it and you don't get it to
work.

Hope it's all clear now,
Best Ingrid

> -----Original Message-----
> From: Manish Saggar [mailto:manish.saggar at gmail.com]
> Sent: Tuesday, June 30, 2009 6:40 AM
> To: ingrid.nieuwenhuis at donders.ru.nl
> Cc: FieldTrip discussion list
> Subject: Re: [FIELDTRIP] Clusterplot not highlighting clusters & average
> layout file
> 
> Thanks for your quick reply. I wanted to run freqstats separately on
> each frequency, since I don't have precise temporal resolution in my
> data (no events). Hence I need to run stats on Freq-Space
> representations and not on TFR. Since clusterplot was not handling
> this case, probably because it is made to search across time and space
> for a given frequency, I ran freqstats/clusterplot separately for each
> frequency.
> 
> So just to make sure I understood correctly, you are saying either I
> use 'cfg.avgoverfreq=yes' especially for lower frequencies and then
> use clusterplot OR do it separately for each frequency but use
> multiplotTFR instead. But it seems like I can also use clusterplot
> separately for each frequency, right? It seemed to work fine. May be I
> am missing some obvious point here. Please let me know.
> 
> Another thing that might be of interest to other people that I noticed
> recently is that neighbourdist measures distance in meters when the
> ELP (sensor location) file is created using BESA for EEG data. Thus a
> default value of 4 cm is considered as 4 m and hence all the available
> channels become neighbors for each channel. Thus I had to use a value
> of 0.1 for neighbourdist, which takes 6 neighbour channels into
> account. I think that is roughly equivalent to the default value of 4
> cm.
> 
> Regards,
> Manish
> 
> On Mon, Jun 29, 2009 at 3:09 PM, Ingrid
> Nieuwenhuis<ingrid.nieuwenhuis at donders.ru.nl> wrote:
> > Dear Manish,
> >
> > (I reply to the list again, than everyone can benefit).
> > That depends on what you want to test. If you have multiple frequencies
> in
> > your freq-data, and you just call freqanalysis, and you do not average
> over
> > specific frequency range, then clusterplot will look for clusters in the
> > time-frequency-place domain. This does not always make sense, for
> instance
> > in the lower frequencies we know that there are different frequency
> bands
> > that behave totally different (theta and alpha for instance). Then you
> can
> > better run freqanalysis for these frequencies separately (choose only
> 10Hz
> > for alpha, or choose 8:12 Hz and cfg.avgoverfreq = 'yes'). In this case
> you
> > can use clusterplot to visualize.
> >
> > If you have no idea which frequencies behave the same, or that is
> something
> > you are actually interested in (for instance you have a broadbanded high
> > gamma in your TFR) you can put freq-data with multiple frequencies in
> > freqanalysis and look at the cluster that comes out. This is a valid
> thing
> > to do, but you can only not use clusterplot to visualize then. What you
> can
> > do is plot with multiplotTFR with mask settings (cfg.zparam = 'stat',
> > cfg.maskparam = 'mask').
> >
> > Best Ingrid
> >
> >> -----Original Message-----
> >> From: Manish Saggar [mailto:manish.saggar at gmail.com]
> >> Sent: Monday, June 29, 2009 7:49 PM
> >> To: ingrid.nieuwenhuis at donders.ru.nl
> >> Subject: Re: [FIELDTRIP] Clusterplot not highlighting clusters &
> average
> >> layout file
> >>
> >> Dear Ingrid,
> >>
> >> Thanks for your reply. Sorry I was out and didn't get a chance to reply
> >> back.
> >>
> >> Last question regarding your reply, can I simply run freqstats and
> >> clusterplot for each frequency separately?
> >>
> >> Regards,
> >> Manish
> >>
> >> On Fri, May 22, 2009 at 9:39 AM, Ingrid
> >> Nieuwenhuis<ingrid.nieuwenhuis at donders.ru.nl> wrote:
> >> > Dear Manish,
> >> >
> >> > If I understand correctly you have multiple frequencies over which
> you
> >> > cluster. Is that correct? (so cfg.avgoverfreq = 'no' when you called
> >> > freqstatistics?) In that case you should not call clusterplot because
> >> for
> >> > different frequencies there can be different channels part of the
> >> cluster.
> >> > Instead you can call multiplotER or multiplotTFR and use
> >> cfg.maskparameter =
> >> > 'mask' to plot the significant cluster.
> >> >
> >> > Hope this helps,
> >> > Ingrid
> >> >
> >> >
> >> >> -----Original Message-----
> >> >> From: Manish Saggar [mailto:manish.saggar at gmail.com]
> >> >> Sent: Friday, May 15, 2009 8:26 AM
> >> >> To: ingrid.nieuwenhuis at donders.ru.nl
> >> >> Cc: FIELDTRIP at NIC.SURFNET.NL
> >> >> Subject: Re: [FIELDTRIP] Clusterplot not highlighting clusters &
> >> average
> >> >> layout file
> >> >>
> >> >> Ingrid, thanks for replying back.
> >> >>
> >> >> Apologies for lack of information.
> >> >>
> >> >> Clusterplot is plotting clusters fine most of the times, but in some
> >> >> cases it doesn't choose to highlight markers. I have attached two
> such
> >> >> images with this email.
> >> >>
> >> >> I do not get any errors or warnings. In fact the command window in
> >> >> matlab says, cluster found (with some prob and highlighter sign) and
> >> >> then the plot doesn't contain any highlighting.
> >> >> Initially I thought that my layout file might be messing it up or
> >> >> something, or may be I need to take an average layout file for group
> >> >> analysis (since cap size and electrode digitization varies for each
> >> >> subject).
> >> >>
> >> >> Then I put debug points in the code and found out that at line 235
> the
> >> >> list cell (used to denote highlighted points) is empty. I am a
> novice
> >> >> so please forgive if what I am suggesting is dumb here, but I think
> >> >> when cluster plot is searching for significant clusters it is only
> >> >> looking into first column (which could correspond to first frequency
> >> >> in band) if one cluster is found by freqstats. It might be that in
> the
> >> >> code you guys are sorting columns and I might have missed it. But I
> >> >> thought I should clear this with you.
> >> >>
> >> >> In another thread you have mentioned to someone that their time
> limits
> >> >> might not be precise enough to get the clusers highlighted
> >> >>
> >>
> (https://listserv.surfnet.nl/scripts/wa.cgi?A2=ind0709&L=FIELDTRIP&P=R680
> >> >> ). But they were doing time-freq analysis and I am just doing freq-
> >> >> representations. So should I use freqstats on each freq separately ?
> >> >>
> >> >> On a side note, when I run freqstats on my data (with 88 channels)
> >> >> command line says '89 neighbors per channel found'. I am a little
> >> >> confused with this. First since I only have less than 88 channels in
> >> >> the data and second since it should only consider a lower number for
> >> >> neighbor distance, right? and how can I change it?
> >> >>
> >> >> Thanks a ton in advance,
> >> >> Manish
> >> >>
> >> >> On May 13, 2009, at 2:10 AM, Ingrid Nieuwenhuis wrote:
> >> >>
> >> >> > Dear Manish,
> >> >> >
> >> >> > You give a bit too few information to be able to figure out what
> >> >> > could be
> >> >> > the problem with clusterplot. After calling clusterplot,
> clusterplot
> >> >> > gives
> >> >> > information on which clusters it finds. Does the function find any
> >> >> > clusters?
> >> >> > Does the .mask field of the structure that comes out of
> >> freqstatistics
> >> >> > contain any ones? Is everything else plotted normally? Do you get
> >> >> > any errors
> >> >> > or warnings?
> >> >> >
> >> >> > I'm not familiar with BESA layout files, but assuming that all
> >> >> > layout files
> >> >> > are similar over subjects, I think it is fine to just use an
> >> >> > individual
> >> >> > subject's layout file.
> >> >> >
> >> >> > Hope this helps,
> >> >> > Best Ingrid
> >> >> >
> >> >> >
> >> >> >>  ---Original Message-----
> >> >> >> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL]
> On
> >> >> >> Behalf Of Manish Saggar
> >> >> >> Sent: Tuesday, May 12, 2009 10:17 AM
> >> >> >> To: FIELDTRIP at NIC.SURFNET.NL
> >> >> >> Subject: [FIELDTRIP] Clusterplot not highlighting clusters &
> average
> >> >> >> layout file
> >> >> >>
> >> >> >> All,
> >> >> >>
> >> >> >> I have a question regarding clusterplot function. I am doing a
> >> >> >> within-subject analysis.
> >> >> >> The experimental design that I have is as follows, there are
> three
> >> >> >> conditions C1, C2 and C3. Each condition is of 1 min duration
> (e.g.
> >> >> >> rest with eyes open for 1 min).
> >> >> >>
> >> >> >> Now I am comparing grandaverage of freq representation of a set
> of
> >> >> >> subjects for C2 with C1 etc. FreqStatistics is running just fine
> >> >> >> creating significant (<0.025 alpha, for 2-tailed test) clusters
> >> >> >> (positive). Now the problem is that when I try to plot the
> location
> >> >> >> of
> >> >> >> this cluster using clusterplot it doesn't show any highlighted
> >> >> >> channels. Any ideas why that is happening?
> >> >> >>
> >> >> >> Another question is that since I am using grandaverages of freq
> >> >> >> representation, what should I use for layout file (using BESA sfp
> >> >> >> file
> >> >> >> here). I have individual subject layout files. Currently I am
> just
> >> >> >> giving any file from one of the subjects. Since, I noticed that
> >> >> >> FreqStatistics finds a common minimum set of channels and then
> apply
> >> >> >> statistics on it. So do I need to average layout files for the
> >> >> >> subject
> >> >> >> group or is there any other way?
> >> >> >>
> >> >> >> Any help is much appreciated.
> >> >> >>
> >> >> >> Regards,
> >> >> >> Manish
> >> >> >>
> >> >> >> ----------------------------------
> >> >> >> 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.
> >> >> >
> >> >> > ----------------------------------
> >> >> > 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.
> >> >>
> >> >
> >> >
> >> >
> >> >
> >
> >
> >
> >

----------------------------------
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.



More information about the fieldtrip mailing list