Skip to main content
Social Sci LibreTexts

3.11: Exercise- ERP Bin Operations

  • Page ID
    108187
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    Now that we’ve seen how to recombine channels with ERP Channel Operations, let’s see how to recombine bins using ERP Bin Operations. One of the most common reasons to recombine bins is to make a difference wave, in which we subtract one bin from another. In an N400 experiment, for example, we can isolate the brain activity that differs between related and unrelated target words by constructing an unrelated-minus-related difference wave.

    Our grand average ERP waveform currently has 4 bins, with Bin 3 being related targets and Bin 4 being unrelated targets. To create an unrelated-minus-related difference wave as Bin 5, we use the following equation:

    Bin5 = Bin4 - Bin3 label Unrelated Minus Related Target

    Make sure that the grand average from the previous exercise (Grand_N400) is still loaded and is the active ERPset. Now select EEGLAB > ERPLAB > ERP Operations > ERP Bin operations. You’ll see a new window like the one shown in Screenshot 3.11. The available bins are listed in the panel along the right side of the window, and there is a text box for writing equations. Type the above equation into that box. Note that there is no space between “Bin” and the bin number. And make sure you use a minus sign rather than a dash. Make sure the rest of the window is set up as shown in the screenshot, and click RUN.

    Screenshot 3.11
    5nl1Yha5jR9-TchRyLVD9VH-O_6WCAY7q1WvHtGLbr6xKLOcJV--_c46Y5gc7z9rRq8dwYS6KzXOeYuNsTurYDZQIRf5mHaUSkmQHqByhcMCpDq-fMZj_o_xl1Y6MLbLwz1-Urw

    Because we’re modifying an existing ERPset rather than creating a new ERPset, you won’t see a window for saving the ERPset. However, if you look in the Matlab Command Window, you’ll see something like this:

    %Equivalent command:
    ERP = pop_binoperator( ERP, { 'Bin5 = Bin4 - Bin3 label Unrelated Minus Related Target'});

    This is the command that you would include in a script to achieve the same result. You’ll learn more about scripting later, but I thought it would be good for you to see that the equivalent Matlab command is printed in the Command Window every time you perform an operation in the ERPLAB GUI.

    Now let’s see what the difference wave looks like. Select EEGLAB > ERPLAB > Plot ERP > Plot ERP waveforms and plot Bins 3, 4, and 5. Screenshot 3.12 shows the waveforms from the CPz site. You can see that the voltage in Bin 5 at a given time point is the difference between the voltages for Bins 3 and 4 at that time point. Note that the difference wave subtracts away any brain activity that is identical for the related and unrelated targets, such as the negativity at ~100 ms and the positivity at ~180 ms. All that remains is the brain activity that differentiates between the related and unrelated targets. This is an excellent way of isolating the brain activity of interest from the ERP waveforms. If you read my general book on ERPs (Luck, 2014), you’ll see that I’m a big fan of using difference waves to isolate specific brain responses.

    Screenshot 3.12
    NTS2--d0_-IyTN2WFsfiEu7Mc7HUFYhiRW2xyzxS6gyVlsPrvd6iRhoPDQXZBFCn4gIQ2jSMLjJV3vk6yk9xDGKpHEaO_XDtn5YbPNOfHZxGXePHPQ_puL856S7la4DmuoScseA

    Lost Information as a Result of Bin and Channel Operations

    The original EEG data files that we used when we began processing this experiment contained information about the 3-dimensional locations of the individual electrode sites. When you use Channel Operations to create a new channel, ERPLAB has no way of knowing the 3-dimensional location that should be used for this channel. And if you modify a channel, ERPLAB isn’t smart enough to know whether the original channel location is still valid. To avoid making assumptions that might turn out to be incorrect, ERPLAB discards the channel information for any new or changed channels when you perform Channel Operations. (If you check the Try to preserve location information box in the GUI, ERPLAB will make a guess about the locations for changed locations, which usually works pretty well.)

    The data quality information (including the SEM at each time point) is also lost when you perform Channel Operations. ERPLAB is not smart enough to know how the data quality should be updated for new or modified channels. Similarly, ERPLAB isn’t smart enough to estimate the data quality when you perform Bin Operations.

    The bottom line is that if information about channel locations or data quality is missing, it is likely a result of Bin Operations or Channel Operations.


    This page titled 3.11: Exercise- ERP Bin Operations is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by Steven J Luck directly on the LibreTexts platform.

    • Was this article helpful?