<div dir="ltr"><div>Good afternoon,</div><div><br></div><div>According to the tutorial I was using (link provided in original message) this was at the very beginning of processing. So, in this case, we were using a raw .mff file that had no previous processing done. This tutorial ran in tandem with a video (link also provided prior) and so I attempted to follow the steps that way. Therefore - yes, the error we ran into was simply importing the data! This is our first issue in our overall goal of attempting to run a CBPT, so you are correct there. So our issue here is not fully understanding the information related to importing the data (as the example uses Neuroscan headers, etc. which are different from ours, of course).<br></div><div><br></div><div>I appreciate the paper you shared. I will look into it and keep working on this. With our little knowledge of Matlab code, trying to figure out errors in the code provides its own challenges, so this is all new to us. <br></div><div><br></div><div>Many thanks!<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 12, 2020 at 7:34 PM Stephen Politzer-Ahles <<a href="mailto:politzerahless@gmail.com">politzerahless@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>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.</div><div><br></div><div>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 <a href="http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock/" target="_blank">http://www.fieldtriptoolbox.org/tutorial/cluster_permutation_timelock/</a>; 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.</div><div><br></div><div>As for your other questions:</div><div>--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).</div><div>--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.<br></div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><br></div><span><div>---<br></div>Stephen Politzer-Ahles<br>The Hong Kong Polytechnic University<br>Department of Chinese and Bilingual Studies<br><a href="http://www.polyu.edu.hk/cbs/sjpolit/" target="_blank">http://www.polyu.edu.hk/cbs/sjpolit/</a></span></div></div></div></div></div></div></div></div></div></div></div><br></div><br><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Wed, 11 Mar 2020 09:50:52 -0400<br>
From: Ryan Priefer <<a href="mailto:rpriefer@adelphi.edu" target="_blank">rpriefer@adelphi.edu</a>><br>
To: <a href="mailto:fieldtrip@science.ru.nl" target="_blank">fieldtrip@science.ru.nl</a><br>
Subject: [FieldTrip] Help with Cluster-Based Permutation Tests<br>
Message-ID:<br>
        <CAHto=<a href="mailto:cjaw%2B-_NKHNMy4Rkp1YeeFu7dd6xjAq-iysH-yj2nB2cA@mail.gmail.com" target="_blank">cjaw+-_NKHNMy4Rkp1YeeFu7dd6xjAq-iysH-yj2nB2cA@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hello,<br>
<br>
I work as a Lab Coordinator for the Neurocognition of Communication<br>
Disorders Lab at Adelphi University, New York. We are looking to perform a<br>
cluster-based permutation test on our EEG data but have some questions as<br>
we are quite unfamiliar with how to apply it to this data in particular,<br>
and neither of us are too familiar with Matlab code.<br>
<br>
We collect our EEG data using a 128-HydroCel Geodesic Sensor Net from<br>
EGI/Philips, and therefore we have used NetStation to do most of our<br>
processing in the past.<br>
<br>
We have attempted to utilize the bountiful tutorials FieldTrip provides on<br>
their website and YouTube channel but to no avail. Specifically, we were<br>
using this <<a href="https://pastebin.com/yskmVKAh" rel="noreferrer" target="_blank">https://pastebin.com/yskmVKAh</a>> code alongside this<br>
<<a href="https://vimeo.com/45658196" rel="noreferrer" target="_blank">https://vimeo.com/45658196</a>> workshop video. We are simply not savvy enough<br>
with Matlab code, despite these resources, and would really appreciate if<br>
someone could provide some clarity on the process. Even the tutorials seem<br>
to assume the user is knowledgeable about Matlab code/certain, intricate<br>
things about the data itself that we just are not.<br>
<br>
We get stuck quite early on, particularly because we don't know what<br>
cfg.headerformat, cfg.dataformat, and cfg.eventformat would be for our<br>
system, as this seems to specify for the neuroscan system :<br>
<br>
   1. cfg=[]; % empties the universally used cfg-structure<br>
   2. cfg.dataset=data{1}; % which dataset? Useful if a for-loop is used<br>
   3. cfg.trialdef.eventtype= '?'; % We don't know what events have happened<br>
   4. cfg.headerformat='ns_cnt32'; % Watch Out! With the neuroscan system,<br>
   you have to set the bit-rate<br>
   5. cfg.dataformat='ns_cnt32'; % Otherwise you'll have corrupt data<br>
   6. cfg.eventformat='ns_cnt32';<br>
<br>
<br>
Some additional questions:<br>
<br>
Do you suggest beginning with a raw file and doing all processing in<br>
fieldtrip for the best results? As of now we have been using a combination<br>
of EEGLAB and NetStation 5 to process the data. We are assuming and hoping<br>
that all of this fieldtrip analysis could be one on a completely processed,<br>
averaged EEG file - but what file type works best? The default for EGI is<br>
.mff, but we could use .raw, .mat, .txt, and so on as exports from the NS5<br>
program..<br>
<br>
Please advise as to what to do, or what further information you'd like from<br>
us. I apologize for potentially a loaded, vague question. We are very new<br>
to this type of analyzing (we usually use R/RStudio).<br>
<br>
Thank you,<br>
<br>
-- <br>
Ryan Priefer<br>
Lab Technical Coordinator<br>
Communication Sciences and Disorders<br>
t: 516.877.6787<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20200311/5224717e/attachment-0001.htm" rel="noreferrer" target="_blank">http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20200311/5224717e/attachment-0001.htm</a>><br>
<br></blockquote><div> </div></div></div>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://doi.org/10.1371/journal.pcbi.1002202" rel="noreferrer" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><font face="times new roman, serif"><span style="color:rgb(0,0,0);font-size:12.8px;font-weight:600;line-height:19.2px">Ryan</span><span style="color:rgb(0,0,0);font-size:12.8px"> </span><span style="color:rgb(0,0,0);font-size:12.8px;font-weight:600;line-height:19.2px">Priefer</span><br style="color:rgb(0,0,0);font-size:12.8px"><span style="color:rgb(0,0,0);font-size:12.8px;line-height:19.2px"></span><span style="color:rgb(0,0,0);font-size:12.8px;font-style:italic;line-height:19.2px">Lab Technical Coordinator</span><br style="color:rgb(0,0,0);font-size:12.8px"><span style="color:rgb(0,0,0);font-size:12.8px;line-height:19.2px">Communication Sciences and Disorders</span><br style="color:rgb(0,0,0);font-size:12.8px"><span style="color:rgb(0,0,0);font-size:12.8px;line-height:19.2px">t: 516.877.6787</span></font><br></div></div></div>