Opening the book…
Our first attempt at ICA-based blink correction was quite simplistic, and as a result the decomposition was not very good (as evidenced by the irregularly shaped scalp maps for some of the ICs in Screenshot 9.2). The main reason for this is that our dataset (like most EEG datasets) contains some really large activity that is difficult for ICA to handle because it is either infrequent or lacks a consistent scalp distribution (e.g., skin potentials, movement artifacts, and other miscellaneous C.R.A.P.). In this exercise, we’ll look at an approach that will minimize the effects of those large noise sources and also make the decomposition run faster. It’s a win-win!
There are several steps for making the ICA decomposition work better. They rely on a little trick, which is to create a new dataset in which you will remove signals that will be problematic for ICA, do the decomposition on this new dataset, and then transfer the ICA weights back to the original dataset. This approach was controversial when I wrote the second edition of An Introduction to the Event-Related Potential Technique, so you won't see it discussed in Chapter 6 of Luck (2014). However, most experts have converged on the idea that this approach is both theoretically justified and practically useful. I've now used it many times myself, and I have seen only benefits and no costs. That's pretty unusual, because I tend to be pretty skeptical about methods like ICA. In fact, some of my former grad students have a hard time believing that I now recommend using it.
The first thing we’re going to do is heavily filter the data, using filter settings that I would never ever EVER ordinarily use for ERP experiments. However, the filtered data will be used only to perform the ICA decomposition, and then we’ll transfer those ICA weights to the original minimally-filtered data. Several studies have shown that this heavy filtering leads to more accurate artifact correction (Dimigen, 2020; Klug & Gramann, 2021; Winkler et al., 2015).
Why Heavy Filtering is OK for the ICA Decomposition
Filters change the time course of an underlying IC, but not the scalp distribution. Heavy filtering is therefore fine for the data used for the ICA decomposition, because we only care about scalp distributions at this stage, not timing. Once we have the IC weights, which are entirely spatial, we’ll transfer these weights back to the original data without the temporal distortion caused by the filtering.
To get started, reset everything with the Reset button, and then load the original EEGset for Subject 10 (10_MMN_preprocessed). Go to the Filtering panel and specify a high-pass cutoff of 1 Hz and a low-pass cutoff of 30 Hz, with a slope of 48 dB/octave. The option for removing the DC offset should be set by default, and you should leave it on. Run the routine and name the resulting EEGset 10_MMN_preprocessed_filt. We’ve now eliminated most of the skin potentials and EMG, both of which may violate the assumptions of ICA and interfere with the decomposition.
Our next step is to downsample the data from 256 Hz to 100 Hz. This just makes the ICA decomposition run faster (as does the reduction of noise produced by the filtering). To do this, go to the Sampling Rate & Epoch panel and set it up as shown in Screenshot 9.6, entering 100 as the new sampling rate. Click Apply and then name the resulting EEGset 10_MMN_preprocessed_filt_100Hz. Note that this step doesn't change the end result, but it does make things go faster.
Screenshot 9.6
The next thing we’re going to do to improve ICA is remove the segments of data during breaks, when the participants may be moving, scratching their heads, chewing, etc. The voltages produced by these actions are typically large but don’t have a consistent scalp distribution. EEGLAB allows you to manually select and delete these time periods from a continuous dataset. ERPLAB adds an automated procedure for this. It just finds periods of time without any event codes and deletes them. Let’s give it a try.
First, let's see what the break periods look like in the original data. Select 10_MMN_preprocessed in the EEGsets panel and scroll through several 5-second time periods. You can see that this EEGset begins with a long break period, because the stimuli don't begin until just after 15 seconds. (There is an event code 1 just after 22 seconds, but that's not the beginning of the stimuli.) You can see tons of blinks and eye movements prior to the onset of the stimuli. You can also see a large EMG burst between 23 and 24 seconds. Once the stimuli start, the EEG and EOG signals start looking a lot cleaner.
Subject 10 actually has pretty clean EEG during the break periods. If you load 6_MMN_preprocessed, you'll see some crazier noise prior to the onset of the stimuli (see Screenshot 9.7). This is the kind of thing that really interferes with the ICA decomposition process.
Screenshot 9.7
Now select 10_MMN_preprocessed_filt_100Hz in the EEGsets panel, go to the Delete Time Segments panel, and set it up as shown in Screenshot 9.8.
This includes specifying 1500 as the Time Threshold. This tells the routine to delete segments in which there are no event codes for at least 1500 ms. The event codes in the MMN experiment occur every ~500 ms, so periods of 1500 ms without an event code must be breaks. Of course, you’d need to use a longer value for experiments with a slower rate of stimuli. Also specify 500 as the amount of time prior to the first event code in a block of trials. This will make sure that we have at least 500 ms for the prestimulus baseline period for the first event in a trial block. Similarly, specify 1500 ms as the time period after the last event code in a block so that we have a good period of data following this event code.
Enter 1 in the field for Eventcode exceptions. This tells the routine to ignore this event code. Our stimulus presentation program sent some event codes with a value of 1 during the breaks, and we want those to be ignored when looking for break periods. Similarly, check the box for ignoring boundary events. Boundary events occur whenever there is a temporal discontinuity in the data. Most commonly, this happens when you have a separate data file for each block and then concatenate them together into a single file. When you do this, a boundary event is inserted at the time point of the transition between one block and the next. Boundary events often occur during breaks, so we want them to be ignored when we’re looking for long periods between event codes.
Screenshot 9.8
Once you have everything set, click the Preview button. This will bring up a new window showing the EEG, with sections that will be deleted marked with a red background. As shown in Screenshot 9.9, the first part of the recording is marked in red until just before 25 seconds. It shifts to white 500 ms before the first event code 180 (ignoring the event code 1). That's because you indicated that there should be a 500 ms buffer before the first event code.
If you type 600 into the text box at the bottom of the window to skip ahead to 600 seconds, you'll see that the break period at the very end of the recording is marked in red (starting just after 610 seconds). The red region starts 1.5 seconds after the last event code. That's because you indicated that there should be a 1500 ms buffer after the last event code. We have only one block in the MMN experiment, so nothing else is marked in red.
Screenshot 9.9
Now close the window showing the marked portions of the EEG, click the Finalize button in the Delete Time Segments panel, and name the new EEGset 10_MMN_preprocessed_filt_100Hz_del.
Our final pre-ICA step is to deal with bad channels. F7 and PO4 both show some crazy behavior in this EEGset. If we leave them in the data, we’ll end up with an IC that just represents F7 and another that just represents PO4. In fact, you can see this in our original ICA decomposition in Screenshot 9.2, where IC 3 just represents the F7 channel and IC 17 just represents the PO4 channel. We’re going to interpolate these channels eventually, so why include them in the ICA decomposition? They're just sucking up ICs that would be better spent on valid data. We could interpolate these channels prior to the ICA decomposition, but that would create a linear dependency among the channels that might mess up the decomposition. Instead, we’ll just exclude them from the ICA decomposition process, and then we can interpolate them after artifact correction is complete.
It's now time to apply the ICA decomposition to this EEGset by going to the EEGLAB ICA panel and clicking the Decompose data button. We’re going to exclude Channels 3 and 24 (the channels for F7 and PO4, respectively), and we’re also going to exclude Channels 32 and 33 (the bipolar EOG channels). To do this, type 1 2 4:23 25:31 into the text box labeled Use only channel type(s) or indices. Make sure everything else is set up as shown in Screenshot 9.10, and click Ok to start the decomposition process. As before, it might take several minutes. When it is done, name the resulting EEGset 10_MMN_preprocessed_filt_100Hz_del_ICAweights. If you don’t want to wait for it to finish, you can just load the EEGset with that name from the Chapter_9 folder, which I created after running the decomposition.
Screenshot 9.10
Once you have this EEGset, you can view the IC scalp maps by clicking Inspect/label ICs in the EEGLAB ICA panel. Tell the tiny window that appears that you want to plot components 1:29 (there are only 29 because we left out the two EEG channels that will need to be interpolated and the two bipolar EOG channels). You should then see a new window that looks like Screenshot 9.11. You'll also see a window that says While you are using the Inspect/Label ICs tool, the main ERPLAB Studio window will be frozen. Click "Okay" when you have closed the Inspect/Label ICs tool.
Your scalp maps may differ slightly from those shown in Screenshot 9.11, especially the ordering and polarity of the ICs. These maps are much nicer than our original maps (Screenshot 9.2). Almost all have either a single focus with a largely monotonic decline (e.g., IC 1 and IC 2) or a bipolar configuration (e.g., IC 13 and IC 25). IC 20 has two foci that are approximately mirror-symmetric across the left and right hemispheres, which is also a perfectly normal pattern (and arises when the two hemispheres operate synchronously). The only irregular-looking map is for IC 29. Because the maps are ordered according to the amount of variance they explain, you shouldn’t worry if the last couple of maps aren’t perfect.
Screenshot 9.11
When you're done looking at the IC maps, close the window with the maps and click Okay in the window that says While you are using the Inspect/Label ICs tool... to unfreeze the main eStudio window.
This page titled 9.4: Exercise- Making ICA Work Better was last modified on Thu, 01 Oct 2026 18:52:29 GMT and is shared under a CC BY-NC 4.0 license and was authored, remixed, and/or curated by Steven J Luck directly on the LibreTexts platform.
The book could not be loaded just now.