[Eeglablist] How can I add events to epoched EEG data via matching variables?

Tarik S Bel-Bahar tarikbelbahar at gmail.com
Mon Mar 6 11:43:34 PST 2017


Hello Marina, some notes below. all the best.

1. You should be able to do this at least once via the gui, by creating a
new event field, and then entering the accuracy info for that event. Then
review the ouput of eegh after that has been run, and build that into your
loop.

2. Adding of sub-information into events isn't handled great in eeglab, so
you may run into some limitations as to how it deals with that info, how it
updates it, and whether it accepts all the extra event info you want to
add. You may require additional matlab expertise to build your own event
structures. I remember doing something similar to you in the past, and I
had considerable trouble with updating and re-updating the event sub-field
information. This may be a good opportunity for recommending an update to
eeglab on eeglab bugzilla.

3. For you loop, in general: Get a variable that is the current stimulus
number in the event list in eeglab. Get a second variable that is the
current stimulis number in your information array. If they match, then feed
the accuracy info into the sub-field of that event.

4. You may benefit from reviewing past eeglablist posts on similar topics,
and also reviewing the function eeg_addnewevents.

5. One alternative is to simply make epoched files that contain
epochs/events with a particular level of accuracy, and other epoched files
at different levels of accuracy. This would be an alternative to marking
every event with accuracy.

6. Once you do get the accuracy events in, you should be able to sort
epochs in erpimage based on accuracy.



On Mon, Mar 6, 2017 at 9:25 AM, <marina.wunderlin at students.unibe.ch> wrote:

> How can I add events to epoched EEG data via matching variables?
>
> My EEG Variable has the following structure for events:
>
> EEG.event: 1X157 struct (157 epochs of a EEG recording)
>
>     - EEG.event.type              --> specific number for each type of
> stimulus
>
>     - EEG.event.accuracy        --> empty
>
>     - ...
>
>     - ...
>
>
> I already read the event info into matlab. Its an array containing subject
> ID, Number of Stimulus and Accuracy for each trial --> trialdata 795x3
>
>
> I want to add the accuracy data from this table (trialdata) to
> EEG.event.accuracy, but it has to be matched for the stimulus number that
> is in both the array "trialdata" and the variable EEG.event.type.
>
>
> I was going for a loop with this basis:
>
>
> for i = 1:size(VAR.event)
>
> (VAR.event(i).type)
>
> VAR.event(i).accuracy = trialdata....
>
> end.
>
>
> ...and this is where i'm stuck. How can I tell the loop that I want the
> stimulus-matched accuracy read into it?
>
>
> I tried it via the user interface first, but the problem seems to be that
> I don't do the matching via latencies...
>
>
>
>
> _______________________________________________
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to eeglablist-unsubscribe at sccn.uc
> sd.edu
> For digest mode, send an email with the subject "set digest mime" to
> eeglablist-request at sccn.ucsd.edu
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20170306/d796562d/attachment.html>


More information about the eeglablist mailing list