2.6: Exercise- Assigning Events to Bins with BINLISTER
-
- Last updated
- Save as PDF
What is a Bin?
When we create averaged ERPs, we often want to combine trials with different event codes into the same average. For example, the N400 experiment used separate event codes to indicate which of the two word lists was used for a given trial, but we don’t really need to make this distinction in our data analysis, so we’ll just average together the trials with the different word lists. Also, we won’t be making averages for the response event codes, but we want to use those codes so that we exclude trials with incorrect responses from our averages. Thus, we need a sophisticated way of indicating which events should be combined together when we make our averages.
We call this process assigning events to bins , and ERPLAB accomplishes this with a routine called BINLISTER . A bin is a set of averaged ERP waveforms—one for each electrode site—that were created by averaging together a specific set of trials. In our N400 experiment, for example, we will create four bins:
- Primes followed by a related target
- Primes followed by an unrelated target
- Targets preceded by a related prime and followed by a correct response
- Targets preceded by an unrelated prime and followed by a correct response
We recorded from 30 channels, so each bin will have 30 averaged ERP waveforms, one for each channel. For all 30 channels in a given bin, we averaged together the same set of trials. Together with some header information, the bins for a given participant are stored together in an ERPset . Figure 2.2 shows how the ERPset will be structured for the average we will be creating in this chapter.
Running BINLISTER
Now that you see how everything fits together, let’s actually use BINLISTER to assign the event codes to bins for our example subject. We’ll start with the dataset that you created in the previous exercise that has the EventList attached ( 6_N400_preprocessed_filt_elist ). If you still have it loaded, make sure that it is active (checked) in the Datasets menu (Dataset 1:6_N400_preprocessed_elist). If you don’t still have it loaded but you saved it as a file, open the file (using EEGLAB > File > Load existing dataset ).
Go to EEGLAB > ERPLAB > Assign bins (BINLISTER) , which will pop up a GUI window. In the text box at the top (under Load Bin Descriptor File from ), you will enter BDF_N400.txt , which is a text file that tells BINLISTER how to assign events to bins for this particular experiment. We’ll take a look at this file later.
BINLISTER adds new information to the EventList, and we want to save a copy of the updated EventList as a text file for this exercise so that we can easily look at it. To accomplish this, check the box next to Text File in the section of the GUI labeled Write resulting EVENTLIST to (not in the section labeled Read EVENTLIST from ). Then type events2.txt in the text box to the right (see Screenshot 2.10). This will be the name of the text file that will be used to store a copy of the updated EventList. Make sure that everything else is set up like the screenshot and then click RUN .
As in the previous exercises, you’ll see a new window that asks What do you want to do with the new dataset? Just accept the default settings by clicking OK . You’ve now created a new copy of the dataset with the updated EventList attached. The new dataset should be named 6_N400_preprocessed_filt_elist_bins . You will need the new dataset for the next exercise, so save the dataset to your hard drive if you’re not going to do the next exercise right away.
Looking at the Bin Assignments in the EventList
Now open the text file that contains a copy of the updated EventList, which should be named events2.txt . You can just double-click it in the Current Folder panel of the main Matlab GUI to open it in the Matlab text editor. It should look something like Screenshot 2.11.
If you compare it with the original version of the EventList (in events.txt ), you’ll see two main differences. First, the new version has a list of the four bins that we’ve created, which includes the number of trials and the label for each bin. For example, you can see that there were 60 instances of Bin 1, which was labeled “Prime word, related to subsequent target word”. The second change is that there are now numbers in the bin column for the individual events (at the far right of the window). These numbers indicate which bin (if any) a given event code has been assigned to. When an event is assigned to a bin, this means that the event is the time-locking event for that trial. In other words, the time of the event code will be time zero in our averaged ERP waveforms.
Consider, for example, item #3 on line 33. It has an event code of 121, which means that it is a prime word that will be followed by an unrelated target word, with the word taken from the first word list (see Table 2.1). It was assigned to Bin 2 (see the far right column in events2.txt ). When we make an averaged ERP waveform for Bin 2, we’ll use this event code as time zero in the waveform. Now look at item #4 on the next line. It has an event code of 221, and it’s the target word that followed the prime word from item #3. It was assigned to Bin 4. The response event codes (e.g., items 1, 2, and 5) were not assigned to a bin because we are not making any averaged ERP waveforms in which the response is at time zero in this experiment.
How BINLISTER Works
How did BINLISTER know what bins we wanted and which event codes should be assigned to each bin? To accomplish this, BINLISTER used a set of abstract bin descriptions that are stored in the BDF_N400.txt file that you entered at the top of the BINLISTER GUI (see Screenshot 2.10). The BDF in the filename stands for bin descriptor file , because it contains abstract descriptors for each bin. Here’s what is in that file:
Bin 1
Prime word, related to subsequent target word
.{111;112}
Bin 2
Prime word, unrelated to subsequent target word
.{121;122}
Bin 3
Target word, related to previous prime, followed by correct response
.{211;212}{t<200-1500>201}
Bin 4
Target word, unrelated to previous prime, followed by correct response
.{221;222}{t<200-1500>201}
The details of the bin descriptor file syntax will be described in a later section, but some aspects of the syntax are fairly obvious here. Each bin is described with three lines. The first line just gives the bin number. The second number is a text string that describes the contents of the bin (and can be whatever you want). The third line is the actual bin descriptor . Each bin descriptor contains one or more event codes inside some curly brackets. For example, Bin 2 contains 121;122 inside the curly brackets, indicating that event codes 121 or 122 should be used as the time-locking event for this bin. Bins 3 and 4 contain a second set of curly brackets that indicate what must follow the time-locking event code. The text t<200-1500>201 means that the time-locking event code must be followed by an event code 201 with a delay of 200-1500 ms. For example, an event code of 221 will be assigned to Bin 4 if and only if it is followed by a correct response (event code 201) within 200 to 1500 ms. Responses that are faster than 200 ms are probably bogus (because no one can respond that quickly), and responses that are later than 1500 ms probably indicate that the subject was zoning out.
BINLISTER reads in the bin descriptor file and then goes through all of the event codes in the EventList. When it finds an event code that matches the bin descriptor for a given bin, it puts that bin number into the bin column for that event code. Note that a given event code can be assigned to more than one bin. For example, we could have one bin for target words that are followed by a correct response and a separate bin for target words irrespective of whether the response was correct.
Now that we’ve discussed how the four bins were defined in this experiment, you should go through several events in the events2.txt file and make sure that you understand why each event was assigned to a given bin. In particular, you should find the target words that were followed by incorrect responses (event code 202) and verify that they were not assigned to a bin.