[Eeglablist] Creating new event codes based on previous combination of event codes in each trial
Renzo Lanfranco
renzo.lanfranco at gmail.com
Wed Sep 23 17:18:53 PDT 2020
Thanks, Clement and Cédric, this is really helpful.
Indeed, I need to create a new event code for each epoch (trial) at
stimulus onset (time zero) that puts together the information from the
previous stimulus-related event code and the response-related event code.
I’m using a decoding toolbox that requires the data to be submitted that
way (all events at time zero). Your code, Cédric, is very helpful. Checking
Clement’s link to the Wiki, I found some information that might indirectly
help too (
https://sccn.ucsd.edu/wiki/Chapter_03:_Event_Processing#Scripts_for_creating_new_events_based_on_context
).
But you’re right, it’s better to keep all the different numbers. So I have
a *new question* now: is there any way to move **all** the event codes in
all the dataset's epochs to time zero? I know this may sound very messy,
but I should be able to set up this decoding analysis this way too, without
losing any event codes.
Thanks so much for your help!
Renzo
*From: *Cédric Cannard <ccannard at protonmail.com>
*Sent: *23 September 2020 23:37
*To: *Clement Lee <cll008 at eng.ucsd.edu>
*Cc: *Renzo Lanfranco <renzo.lanfranco at gmail.com>; EEGLAB List
<eeglablist at sccn.ucsd.edu>
*Subject: *Re: [Eeglablist] Creating new event codes based on previous
combination of event codes in each trial
Hi Renzo,
I agree with Clement, you normally want to keep the event names as they
refer to the same type of stimulus/response across epochs, and it is easier
to analyze event-related activity like this than if they all have different
numbers.
So I wouldn't recommend it, but if you just want to just rename them in a
linear growing manner (not sure how you want to rename them exactly), you
can do so with something like this:
for iEvent = 1:size(EEG.event,2)
EEG.event(iEvent).type = num2str(iEvent);
end
Cédric
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Wednesday, September 23, 2020 1:43 PM, Clement Lee <cll008 at eng.ucsd.edu>
wrote:
> Hi Renzo,
>
> What are you trying to accomplish by recoding the stimulus event to
contain
> information about the response? Depending on your goal, there may be
easier
> or more common pipelines to follow.
> Have you looked through the EEGLAB wiki's tutorial pages?
> https://sccn.ucsd.edu/wiki/I.Single_subject_data_processing_tutorial
> https://sccn.ucsd.edu/wiki/I.Single_subject_data_processing_tutorial.
> Particularly, Ch. 3 (
https://sccn.ucsd.edu/wiki/Chapter_03:_Event_Processing
> ) seems relevant in your case.
>
> Best,
> Clement Lee
> Applications Programmer
> Swartz Center for Computational Neuroscience
> Institute for Neural Computation, UC San Diego
> 858-822-7535
>
> On Wed, Sep 23, 2020 at 12:20 PM Renzo Lanfranco renzo.lanfranco at gmail.com
> wrote:
>
> > Hi everybody,
> > Thanks in advance. I was hoping someone could lend me a hand. I need to
> > perform the following analysis and don't know how:
> > This is for an EEG decoding analysis, but the EEG data (Biosemi 64) was
> > pre-processed in EEGLAB. Each epoch has two relevant event codes: the
> > stimulus class code (printed at time zero) and a response type code
> > (printed at the moment the participant pressed a key). Therefore, the
> > second event code can vary in time whereas the first event code doesn't.
> > What do I need to do?
> > Based on these event codes, I need to create new event codes for every
> > trial and print new codes at time zero that can comprise the previous
event
> > codes. For example, if event code at time zero can be 1, 2 or 3, and
> > response code printed later can also be 4, 5 or 6., I now need to have
> > event codes at time zeroes that account for all those combinations, e.g.
> > 14, 15, 16, 24, 25, 26, 34, 35, and 36.
> > Any ideas how can I accomplish this? I don't have much experience
working
> > with EEGLAB structures.
> > Thanks so much,
> > R
> >
> > Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> > To unsubscribe, send an empty email to
> > eeglablist-unsubscribe at sccn.ucsd.edu
> > For digest mode, send an email with the subject "set digest mime" to
> > eeglablist-request at sccn.ucsd.edu
>
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to
eeglablist-unsubscribe at sccn.ucsd.edu
> For digest mode, send an email with the subject "set digest mime" to
eeglablist-request at sccn.ucsd.edu
More information about the eeglablist
mailing list