[FieldTrip] Help with Cluster-Based Permutation Tests

Stephen Politzer-Ahles politzerahless at gmail.com
Fri Mar 13 03:33:46 CET 2020


Could you clarify what step of the processing this cfg code is for?
Processing data and eventually running a cluster-based permutation test
requires many steps, most of which have their own function, and each
function has its own cfg structure to go along with it (the cfg structure
is just a way of passing arguments to the function). The cfg you've put
here looks like it's related to importing the data, rather than part of
actually running the permutation test.

To get started, I would recommend reading the paper by Maris & Oostenveld
(2007), which explains the logic and procedures for the test, and going
through the tutorial at
http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock/;
that has the code you're going to need, and it comes with a dataset already
prepared, so you'll be able to go through the whole thing with the sample
data to see how it works before you try it on yours. Unfortunately, I don't
think there's any way around learning MATLAB code; to be able to run these
tests and know what you're doing (enough to avoid making mistakes, or to
notice if you do make a mistake) you will need at least basic familiarity
with MATLAB.

As for your other questions:
--I don't think the results will differ as a function of whether you import
a raw file and process within fieldtrip, or whether you process elsewhere
and then import averages. Most of the processing is going to come out the
same wherever you do it (there are some minor differences in the default
settings of the filters used by Fieldtrip vs. those used by, e.g., EEGLAB).
The bigger issue is what's easier. For me, I sometimes find it a little
difficult to import already-averaged data into fieldtrip (there surely is a
way to do it, but in my own pipeline I just hack it -- which also requires
a decent familiarity with MATLAB code and with the structure of Fieldtrip
objects). Personally I find it easier to just do the preprocessing within
Fieldtrip (YMMV, though, depending on how familiar you are with Fieldtrip).
--As for the best data type for importing, I haven't worked with EGI so I'm
not familiar with any of these or how they work with Fieldtrip, but there
definitely are other people on the mailing list who will be; I'd recommend
sending this as a separate question on its own.

---
Stephen Politzer-Ahles
The Hong Kong Polytechnic University
Department of Chinese and Bilingual Studies
http://www.polyu.edu.hk/cbs/sjpolit/




> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 11 Mar 2020 09:50:52 -0400
> From: Ryan Priefer <rpriefer at adelphi.edu>
> To: fieldtrip at science.ru.nl
> Subject: [FieldTrip] Help with Cluster-Based Permutation Tests
> Message-ID:
>         <CAHto=
> cjaw+-_NKHNMy4Rkp1YeeFu7dd6xjAq-iysH-yj2nB2cA at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hello,
>
> I work as a Lab Coordinator for the Neurocognition of Communication
> Disorders Lab at Adelphi University, New York. We are looking to perform a
> cluster-based permutation test on our EEG data but have some questions as
> we are quite unfamiliar with how to apply it to this data in particular,
> and neither of us are too familiar with Matlab code.
>
> We collect our EEG data using a 128-HydroCel Geodesic Sensor Net from
> EGI/Philips, and therefore we have used NetStation to do most of our
> processing in the past.
>
> We have attempted to utilize the bountiful tutorials FieldTrip provides on
> their website and YouTube channel but to no avail. Specifically, we were
> using this <https://pastebin.com/yskmVKAh> code alongside this
> <https://vimeo.com/45658196> workshop video. We are simply not savvy
> enough
> with Matlab code, despite these resources, and would really appreciate if
> someone could provide some clarity on the process. Even the tutorials seem
> to assume the user is knowledgeable about Matlab code/certain, intricate
> things about the data itself that we just are not.
>
> We get stuck quite early on, particularly because we don't know what
> cfg.headerformat, cfg.dataformat, and cfg.eventformat would be for our
> system, as this seems to specify for the neuroscan system :
>
>    1. cfg=[]; % empties the universally used cfg-structure
>    2. cfg.dataset=data{1}; % which dataset? Useful if a for-loop is used
>    3. cfg.trialdef.eventtype= '?'; % We don't know what events have
> happened
>    4. cfg.headerformat='ns_cnt32'; % Watch Out! With the neuroscan system,
>    you have to set the bit-rate
>    5. cfg.dataformat='ns_cnt32'; % Otherwise you'll have corrupt data
>    6. cfg.eventformat='ns_cnt32';
>
>
> Some additional questions:
>
> Do you suggest beginning with a raw file and doing all processing in
> fieldtrip for the best results? As of now we have been using a combination
> of EEGLAB and NetStation 5 to process the data. We are assuming and hoping
> that all of this fieldtrip analysis could be one on a completely processed,
> averaged EEG file - but what file type works best? The default for EGI is
> .mff, but we could use .raw, .mat, .txt, and so on as exports from the NS5
> program..
>
> Please advise as to what to do, or what further information you'd like from
> us. I apologize for potentially a loaded, vague question. We are very new
> to this type of analyzing (we usually use R/RStudio).
>
> Thank you,
>
> --
> Ryan Priefer
> Lab Technical Coordinator
> Communication Sciences and Disorders
> t: 516.877.6787
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20200311/5224717e/attachment-0001.htm
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20200313/03284d16/attachment.htm>


More information about the fieldtrip mailing list