Skip to main content
Social Sci LibreTexts

5.11: Exercise- Other Common Re-Referencing Scenarios

  • Page ID
    108172
  • \( \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}}\)

    The previous exercise began with the single-ended data produced by the BioSemi system we used for the ERP CORE experiments, so we referenced the data rather than re-referencing the data. Most EEG systems give you differential (referenced) data rather than single-ended data, but it is often necessary to re-reference the data from these systems offline . In this exercise, we’ll see how to implement two common re-referencing scenarios you might encounter with differential data. In the first scenario, the data were recorded with a left mastoid reference, but you want to use the average of the left and right mastoids as the reference. In the second, the data were recorded with Cz as the reference (which is the default in the EGI system), and you again want to use the average of the mastoids as the reference. Another common scenario would be to take referenced data and re-reference to the average of all sites, but we already saw how to do that in an earlier exercise. (That exercise used averaged ERPs rather than EEG, but re-referencing works the same with ERP data and EEG data.)

    I’ve created two versions of the EEG data from the preceding N400 example for these two scenarios, and you can find them in the Chapter_5 folder. The file named 6_N400_LmRef.set has EEG and EOG data referenced to the left mastoid (including an Rm channel that has EEG data from the Rm site that were referenced to Lm). The file named 6_N400_CzRef.set has EEG and EOG data referenced to Cz (including Lm and Rm channels that were referenced to Cz). Go ahead and load these two files into EEGLAB.

    Where did these datasets come from?

    I don’t actually have files for the N400 experiment that were recorded using Lm or Cz as the reference, so I created approximations by applying Channel Operations to the single-ended data. I simply relabeled the P9 and P10 channels as Lm and Rm. That is, we’re just going to pretend that P9 was actually Lm and P10 was actually Rm. In 6_N400_LmRef.set, we’ll pretend that the data were referenced to Lm (even though I actually referenced the data to P9). This file contains a channel labeled Rm, which we’re pretending is the voltage between Rm and Lm (but is actually the voltage between P10 and P9). In 6_N400_CzRef.set, I simply referenced the data to to Cz (including channels labeled Lm and Rm that actually have the data from P9 and P10, referenced to Cz).

    Let’s start by re-referencing the data in 6_N400_LmRef.set to the average of the left and right mastoids. As we saw in the exercises using the spreadsheet, we can do this by simply subtracting 50% of the voltage between Rm and Lm from the voltage in each channel. Make sure the 6_N400_LmRef.set dataset is active and then select EEGLAB > ERPLAB > EEG Channel Operations. Clear out any existing equations and make sure the mode is set to Create new dataset. You can then use the Reference assistant to create the appropriate equation for each channel. But this time, I’m not going to tell you how to do it; you should figure it out for yourself. You can look at the list of Existing Channels in the Channel Operations GUI to figure out the channel number for the Rm signal. (If you get stuck, the equations are in a file named Re-Reference_Lm.txt. But you’ll learn a lot more if you figure it out for yourself.) Once you’re done, you can plot the data. The waveforms should look nearly identical to those you created in the previous exercise, with the average of P9 and P10 as the reference.

    If you did it the same way I did, you’ll still have a channel labeled Rm, but now it's the voltage between Rm and the average of Lm and Rm. It’s not a very useful channel, but it doesn’t hurt to keep it. Alternatively, you could keep the original signal, with Rm referenced to Lm. Or you could just eliminate that channel.

    Now let’s re-reference the data in 6_N400_CzRef.set to the average of the left and right mastoids. This is pretty simple: We just need to subtract the average of the two mastoids from each channel. To make it a little more challenging, you should also include an equation to recover the Cz signal, referenced to the average of the two mastoids. Again, I’m not going to tell you how to do it, but here’s a hint for recreating Cz: the voltage at Cz with Lm as the reference is the same as -1 times the voltage at Lm with Cz as the reference. Don’t forget to look at the list of Existing Channels in the Channel Operations GUI to figure out the channel numbers for the Lm and Rm signals. (If you get stuck, the equations are in a file named Re-Reference_Cz.txt.) Again, when you plot the data, the waveforms should look nearly identical to those you created in the previous exercise. Pay particular attention to the Cz channel to make sure the one you just created looks like the original.


    This page titled 5.11: Exercise- Other Common Re-Referencing Scenarios 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.