[FieldTrip] question on cluster-based statistics and source

Stephen Whitmarsh stephen.whitmarsh at gmail.com
Thu Jan 18 18:02:00 CET 2018


Hi there,

I just wanted to follow up and note that cluster-statistics are certainly
implemented for source-level reconstructed data (as a pointer to start,
see: http://www.fieldtriptoolbox.org/example/source_statistics)
I strongly suggest to use the functionality as intended in which most of
the typical user cases should be supported.

Best wishes,
Stephen




On 15 January 2018 at 22:04, Vahab Yousofzadeh <bioeng.yoosofzadeh at gmail.com
> wrote:

> Dear Vincent,
>
> For cluster correction at source space, you would need to trick the
> ft_prepare_neighbours because (as far as I know) it only works with
> sensor-space data - so you just need to update the pos. with those
> from the source model. Here's a piece of scripts:
>
> s = timePost; % timePost is the output of ft_timelockanalysis.
> s.grad.chanpos = headmodel_time.pos(headmodel_time.inside,:);
> s.grad.chanori = s.grad.chanpos;
> s.grad.chanunit(1:size(s.grad.chanpos,1)) = s.grad.chanunit(1);
> s.grad.chantype(1:size(s.grad.chanpos,1)) = s.grad.chantype(1);
> s.grad.tra    = ones(size(s.grad.chanpos,1),size(s.grad.tra,2));
> for i=1:size(s.grad.chanpos,1)
>     s.grad.label{i} = num2str(i);
>     s.label{i} = num2str(i);
>     s.grad.labelold =  num2str(i);
> end
> % prepare_neighbours determines what sensors may form clusters
> cfg_neighb.method   = 'distance';
> % cfg.method      = 'triangulation';
> neighbours          = ft_prepare_neighbours(cfg_neighb, s);
>
> %% inspecting random neighbours (#1200)
> neighbours2 = [];
> neighbours2 = neighbours(1200);
> % neighbours2.neighblabel = neighbours2.neighblabel(1:20);
> % plotting neighbours for inspection
> cfg            = [];
> cfg.neighbours = neighbours2;
> ft_neighbourplot_source(cfg, s);
>
> Now for cluster-correction, you need to have your source trials as
> inputs, and do something like:
>
> %% Cluster-correction
> cfg = [];
> cfg.parameter        = 'pow';
> cfg.dim              = sourcemodel.dim;
> cfg.method           = 'montecarlo';
> % cfg.statistic        = 'ft_statfun_depsamplesT';
> cfg.statistic        = 'depsamplesT';
> % cfg.statistic         = 'indepsamplesT';
> cfg.correctm         = 'cluster';
> % cfg.correctm         = 'fdr';
> cfg.clusteralpha     = 0.01;
> cfg.clusterstatistic = 'max';
> % cfg.correcttail = 'prob';
> cfg.tail             = 0;
> cfg.clustertail      = 0;
> cfg.alpha            = 0.05;
> cfg.numrandomization = 5000;
> cfg.neighbours      = ft_prepare_neighbours(cfg_neighb, s);
>
> ntrials                       = L;
> design                        = zeros(2,2*ntrials);
> design(1,1:ntrials)           = 1;
> design(1,ntrials+1:2*ntrials) = 2;
> design(2,1:ntrials)           = 1:ntrials;
> design(2,ntrials+1:2*ntrials) = 1:ntrials;
>
> cfg.design   = design;
> cfg.ivar     = 1;
> cfg.uvar     = 2;
> stat         = ft_sourcestatistics(cfg,Source1,Source2);
> stat.pos     = souremodel.pos;% keep positions for plotting later
>
> and for plotting stats,
>
> cfg              = [];
> cfg.voxelcoord   = 'no';
> cfg.parameter    = 'stat';
> % cfg.interpmethod = 'nearest';
> cfg.interpmethod = 'sphere_avg';
> statint  = ft_sourceinterpolate(cfg, stat, template_mri);
> cfg.parameter    = 'mask';
> maskint  = ft_sourceinterpolate(cfg, stat, template_mri);
>
> statint.mask = maskint.mask;
>
> atlas = ft_read_atlas('ROI_MNI_V4.nii');
>
> statint.coordsys  = 'mni';
> cfg               = [];
> cfg.method        = 'ortho';
> % cfg.method = 'slice';
> cfg.funparameter  = 'stat';
> cfg.maskparameter = 'mask';
> cfg.atlas         = atlas;
> cfg.location      = 'max';
> % cfg.funcolorlim   = [-5 5];
> cfg.funcolormap   = 'jet';
> % cfg.location = [x,y,z];
> ft_sourceplot(cfg,statint);
>
> Hope this helps, and let me know if you are running into issues.
>
> Cheers,
> Vahab
>
> On Wed, Jan 10, 2018 at 9:55 AM,  <fieldtrip-request at science.ru.nl> wrote:
> > Send fieldtrip mailing list submissions to
> >         fieldtrip at science.ru.nl
> >
> > To subscribe or unsubscribe via the World Wide Web, visit
> >         https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> > or, via email, send a message with subject or body 'help' to
> >         fieldtrip-request at science.ru.nl
> >
> > You can reach the person managing the list at
> >         fieldtrip-owner at science.ru.nl
> >
> > When replying, please edit your Subject line so it is more specific
> > than "Re: Contents of fieldtrip digest..."
> >
> >
> > Today's Topics:
> >
> >    1. 2nd International LSL Workshop (27.9-28.9.2018) - Save    the
> >       Date (Martin Bleichner)
> >    2. Re: question on cluster-based statistics and source
> >       localization (Robert Oostenveld)
> >
> >
> > ----------------------------------------------------------------------
> >
> > Message: 1
> > Date: Wed, 10 Jan 2018 15:39:55 +0100
> > From: Martin Bleichner <martin.bleichner at uni-oldenburg.de>
> > To: lsl-l at mailman.ucsd.edu, eeglablist at sccn.ucsd.edu,
> >         fieldtrip at science.ru.nl
> > Subject: [FieldTrip] 2nd International LSL Workshop (27.9-28.9.2018) -
> >         Save    the Date
> > Message-ID: <27e861b5-5224-61c5-d02c-3b70140acba2 at uni-oldenburg.de>
> > Content-Type: text/plain; charset="utf-8"; Format="flowed"
> >
> > Dear colleagues,
> >
> > We are happy to announce the second international Lab Streaming Layer
> > (LSL) workshop, which will take place September 27 - 28, 2018, at the
> > Hanse Wissenschaftskolleg, in Delmenhorst, Germany. LSL is an
> > open-source project enabling the synchronized streaming of time series
> > data coming from different devices, such as EEG amplifiers, audio,
> > video, eye tracking, keyboards, etc. LSL features near real-time access
> > to data streams, time-synchronization, networking and centralized
> > collection (https://github.com/sccn/labstreaminglayer).
> >
> > Key LSL developers and expert users have confirmed attendance. The
> > workshop will provide a general introduction to LSL. We will present how
> > LSL can be used for a multitude of different experimental setups, using
> > a variety of experimental software, hardware and?operating systems. In a
> > hands-on session, participants can learn to stream data from their own
> > hardware or play with hardware provided by us and external partners. We
> > will name pitfalls and discuss how to test and ensure the best possible
> > timing accuracy when recording multimodal data. We will also provide a
> > best practice guide and present different use cases of LSL. We will also
> > use the workshop to discuss future software and hardware developments.
> >
> > Participants are invited to contribute to the workshop by presenting
> > their LSL use cases.
> >
> > More information on the workshop will follow soon. For further
> > enquiries, please contact: martin.bleichner at uol.de
> > <mailto:martin.bleichner at uol.de>
> >
> > Best,
> >
> > Martin Bleichner
> >
> > --
> > Dr. Martin Bleichner
> > Neuropsychology    Lab
> > Department of Psychology
> > University of Oldenburg
> > D-26111 Oldenburg
> > Germany
> >
> > martin.bleichner at uni-oldenburg.de
> > Tel.: +49 (0)441 - 798-2940
> > http://www.uni-oldenburg.de/psychologie/neuropsychologie/
> team/martin-bleichner/
> >
> > -------------- next part --------------
> > An HTML attachment was scrubbed...
> > URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/
> attachments/20180110/71ab956b/attachment-0001.html>
> >
> > ------------------------------
> >
> > Message: 2
> > Date: Wed, 10 Jan 2018 15:55:57 +0100
> > From: Robert Oostenveld <r.oostenveld at donders.ru.nl>
> > To: FieldTrip discussion list <fieldtrip at science.ru.nl>
> > Cc: Vincent Wens <vwens at ulb.ac.be>
> > Subject: Re: [FieldTrip] question on cluster-based statistics and
> >         source  localization
> > Message-ID: <E1AC378D-E513-472B-A443-6E1439FE0A50 at donders.ru.nl>
> > Content-Type: text/plain; charset="utf-8"
> >
> > Hi Vincent,
> >
> > Let me reply through the email list, where other people might learn
> something and/or want to chime in.
> >
> >> On 10 Jan 2018, at 13:22, Vincent Wens <vwens at ulb.ac.be> wrote:
> >>
> >> Dear Pr. Oostenveld,
> >>
> >> I am Vincent Wens, a physicist working in the MEG unit at Erasme
> Hospital, Brussels. We've been recently trying to play with the
> cluster-based statistics that you developed and included in Fieldtrip, but
> hit a difficulty in our analysis pipeline and I wondered if you would be so
> kind to take a few minutes and provide advice on this?
> >
> > The cluster-based statistics is a method for statistical inference, i.e.
> statistical decision making based on a hypothesis and estimated probability
> distribution. The hypothesis H0 states that the data can be exchanged
> (between conditions). If it is very unlikely that the data can be exchanged
> (under H0), we decide that the data must be different somehow. The clusters
> provide evidence for the data being different, but the clusters are not the
> difference itself. The tip of an iceberg above the sea level provides
> evidence for there being an iceberg, but the tip is not the iceberg itself.
> >
> > An important FAQ is this http://www.fieldtriptoolbox.
> org/faq/how_not_to_interpret_results_from_a_cluster-based_permutation_test
> >
> > Let me give the other commens in-line in your email below
> >
> >> Globally, my question is how to go from sensor-level cluster statistics
> results to the source space.
> >>
> >> More precisely: Assume we run the cluster statistics analysis on, say,
> N-channels time-frequency plots and obtain significance for the maximum
> cluster statistic.
> >
> > So you obtain evidence that the channel level data is different. That
> logically implies that the cortical activity is different. Note that the
> other way arround would not hold per see; there can be different activity
> in the brain without it showing up as a difference in the scalp data.
> >
> >> We thus find one (and possibly more) supra-threshold cluster(s) whose
> "spatio-spectral-temporal localization" can be assessed.
> >
> > You could look at the visible tip (i.e. the cluster), you could also
> take a broader approach and look at the phenomenom under the tip (the
> iceberg).
> >
> >> See for example the attached picture depicting the plot of those
> T-values within the significant cluster associated with an ERD. The next
> step would then be to source localize this,
> >
> > You would not localize the cluster (you already have it, it is at the
> channel level). You localize the cortical activity that causes the data to
> appear different at the channel level. It?s the part of the iceberg under
> the sea level that causes the tip to appear above sea level.
> >
> >> and our initial idea was to use the time and frequency region from this
> cluster as a prior on the time and frequency used for source projection.
> However the very complex shape of the cluster does not make this step so
> obvious. There are multiple possibilities that would come to mind, most of
> them absolutely ad-hoc, so I wondered your opinion on what would be the
> most rigorous, or at least least unacceptable way to go (or even just the
> most standard way, if there's one).
> >
> > Based on the resulls (the multiplot), you should wonder whether there is
> only a single feature in the brain that is different or whether there are
> multiple. The hypothesis you started with was ?is there any difference in
> this massive multiple-comparision space?? and the (only) answer you got to
> that question was ?yes?.
> >
> > You now have the question ?what is the difference?, which pertains to
> interpreting the data. That question has no binary answer and a statistical
> test based of a p-value being small enough (which gives you a "yes/no"
> answer) does not help.
> >
> > I cannot offer specific advice on how to interpret your data, but
> recommend that you consider whether your true quest is for ?the (one and
> only) effect? or ?the effects? that causes the data in the two conditions
> to be different. Of course you can argue that the effect(s) show at certain
> frequency ranges and/or latencies and/or locations, and therefore you may
> decide to look for the interpretation of the effect(s) at or around those
> parts of the cluster.
> >
> > In general (not any more for this dataset) it is worthwile to consider
> that narrow a-priori hypotheses provide more valuable and specific
> information. This is something that we often rely on in sequential studies,
> where in the 2nd study we don?t repeat the full hypothesis of the 1st study
> (e.g. ?is there any difference?), but a more specific sub-hypothesis that
> we generated on basis of the first study (e.g. is there a difference around
> this specific time-frequency range).
> >
> >> Thanks in advance for your invaluable help, and still my best wishes
> for the New Year.
> >
> > You?re welcome. Please follow up questions on the email discussion list.
> >
> > best regards,
> > Robert
> >
> >
> > -------------- next part --------------
> > An HTML attachment was scrubbed...
> > URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/
> attachments/20180110/dedffb0b/attachment.html>
> > -------------- next part --------------
> > A non-text attachment was scrubbed...
> > Name: cluster_1_grad.png
> > Type: image/png
> > Size: 191076 bytes
> > Desc: not available
> > URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/
> attachments/20180110/dedffb0b/attachment.png>
> >
> > ------------------------------
> >
> > _______________________________________________
> > fieldtrip mailing list
> > fieldtrip at donders.ru.nl
> > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> >
> > End of fieldtrip Digest, Vol 86, Issue 6
> > ****************************************
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20180118/683e6d16/attachment-0001.html>


More information about the fieldtrip mailing list