Skip to main content
Social Sci LibreTexts

7.6: Exercise - Interpolating Bad Channels

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

    If you don’t already have the 1_MMN_preprocessed.set dataset loaded, you should load it now. This dataset has already been preprocessed, including referencing to the average of P9 and P10 and high-pass filtering with a half-amplitude cutoff at 0.1 Hz. An EventList has been added, and BINLISTER has been run to assign events to bins. We have only two bins: Deviant Preceded by Standard (Bin 1, 200 epochs)) and Standard Preceded by Standard (Bin 2, 585 epochs).

    We’ve already looked carefully at the EEG (as shown in the video), and now we need to make a decision about whether C5 and/or F8 should be interpolated. To help make this decision, let’s calculate the SME. First, we need to epoch the continuous EEG, so select EEGLAB > ERPLAB > Extract bin-based epochs. Specify an epoch of -200 to 800 ms and Pre as the baseline.

    Now we’re ready to compute the SME. The SME is automatically computed when we create averaged ERPs, but we don’t need to look at averages right now, so you should instead get the SME values by selecting EEGLAB > ERPLAB > Compute data quality metrics (without averaging).

    We’re quantifying MMN amplitude as the mean voltage from 125 to 225 ms, so we want to get the SME values for this time range. To do this, select Custom parameters in the averaging GUI and click the Set DQ options… button. A new window will appear. Click Add a row to add a new time window. You’ll need to scroll down to see the new row. Change to the name of this row to aSME at 125 to 225 and change the time window start and end fields to 125 and 225. Then click Save to get back to the main averaging GUI, and then click RUN.  A table with the data quality values will then appear. If you look at the aSME values for Bin 1, the rightmost column will show the values for the 125-225 ms time range.

    You’ll see that the aSME values for Fp1, Fp2, and VEOG-bipolar are all quite high relative to the other channels. That’s because of blinking, so you can ignore those channels. (You could perform artifact correction prior to examining the aSME to avoid this issue, especially if you were concerned that one of these channels should be interpolated.) Of the remaining channels, C5 really stands out, with a value that is much higher than the other channels.

    The data quality table GUI includes two tools that can help you find problematic values. First, the Color heatmap option colors each cell according to the value relative to the other cells. Try that, and you’ll see that the C5 channel pops out. The EOG, Fp1, and Fp2 sites also pop out, but that’s because we haven’t gotten rid of the blinks.

    The second way of identifying problematic channels is to click the Outliers button. Turn off the Color heatmap option and then turn on the Outliers option. It will highlight any cells that are more than N standard deviations (SDs) away from the mean aSME value for that time period. The default setting of N is 2, which means that it will highlight cases that are more than 2 SDs above the mean. But when computing the SD, it would make sense to leave out the EOG, Fp1, and Fp2 channels, because they are a poor comparison for the other channels as a result of the blinking. The Outliers feature therefore allows you to specify a subset of the channels for computing the SD. Enter 3:28 in this text box. You’ll now see that the C5 channel is highlighted in most or all time periods. When combined with the fact that C5 was clearly problematic in our visual inspection of the data, these aSME results provide good reason to interpolate this channel.

    What about F8, which also looked pretty bad in our visual inspection? The aSME for F8 is well within the range of the other frontal electrode sites. This indicates that the high-frequency noise in F8 isn’t really impacting our ability to quantify the amplitude of the MMN using the mean voltage between 125 and 225 ms. That noise could be problematic for other measures (e.g., the peak amplitude), but it’s not problematic for the planned analyses of the present study (especially given that the main analysis will be limited to FCz). So, there would be little value in interpolating this channel given the way the data will be analyzed.

    In the analyses provided in the ERP CORE paper (Kappenman et al., 2021), F8 was interpolated because we did not yet have the SME metric and it “looked” noisy. Now I would make a different decision. I guess you can teach an old dog new tricks!

    Now that we’ve decide to interpolate C5 but not F8, it’s time to implement the interpolation. Close the Data Quality viewer window, and select the original continuous dataset (1_MMN_preprocessed) in the Datasets menu. Then select EEGLAB > ERPLAB > Preprocess EEG > Selective Electrode Interpolation. Put 11 in the Interpolate Electrodes box (because C5 is Channel 11). We don’t want our bipolar EOG electrodes to be used for the interpolation, because they don’t have the same reference as C5 and would mess up the interpolation, so put 32 33 in the Ignore Electrodes box. Select Spherical as the Interpolation Method and click the Interpolate button. Name the resulting dataset 1_MMN_preprocessed_interp (and you may want to save it to your disk because we’ll use it in the following exercises).

    Now look through the EEG data using EEGLAB > Plot > Channel data (scroll). The C5 channel should now look beautiful, even later in the session when the original C5 channel looked terrible. Success! However, keep in mind that the C5 channel now contains estimated voltages, not measured voltages. But that’s good enough for our present purposes, especially given that the main analyses will be performed on a different channel.

    One last note about interpolation: If you are using the average across sites as the reference, the data from any bad channels will contaminate all the channels. You might therefore want to use a single electrode (or a pair of electrodes such as P9 and P10) as the reference prior to interpolation. You can then re-reference to the average of all sites after interpolation. A more complex but more robust approach is implemented by the PREP pipeline (Bigdely-Shamlo et al., 2015).


    This page titled 7.6: Exercise - Interpolating Bad Channels is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by Steven J Luck.

    • Was this article helpful?