4.5: Practical Advice About Filtering

Applied Event-Related Potential Data Analysis 2e · LibreTexts

0%

Contents

    Text

    Size
    100%
    Theme
    Typeface
    Line length
    Spacing

    From LibreTexts, under CC BY-NC 4.0, as the source states it; its equations are written in TeX, which the PDF shows typeset. This page at LibreTexts.

    4.5: Practical Advice About Filtering

    The sections following this one will take a deep dive into how filters work in the time domain, why they produce waveform distortion, and how you can choose the optimal filter settings for your own data so that you reduce as much noise as possible without producing too much waveform distortion. But many readers won't want to take this deep dive now, so this section will provide several pieces of important practical advice that all readers will want to know.

    When to Filter

    Let’s start with the question of when to filter. With typical parameters, high-pass filters can create “edge artifacts” at the beginning and end of the waveform. As a result, it is usually a bad idea to apply high-pass filters to epoched EEG or averaged ERPs. Instead, high-pass filters should be applied to the continuous EEG so that these artifacts only impact the very beginning and very end of the recording. In addition, I recommend starting the recording 10-20 seconds before the task starts and ending it 10-20 seconds after the task ends. That way, the artifacts will be in a part of the recording that doesn’t contribute to your final analyses. To further minimize edge artifacts, you should use the option labeled "Remove mean value (DC offset) before filtering" when you are filtering continuous EEG data (but not when you are filtering epoched EEG or averaged ERPs). This option is active by default, but you could disable it by clicking the Advanced button in the Filtering panel. Don’t disable it unless you really know what you’re doing.

    With typical parameters, you can apply low-pass filters to the continuous EEG, the epoched EEG, or the averaged ERPs. For most researchers, it will be simplest just to apply both the low- and high-pass filters to the continuous EEG. In my lab, we often apply only a high-pass filter to the continuous EEG and save our low-pass filtering for the averaged ERPs, but that’s mainly for philosophical reasons rather than practical reasons (see Luck, 2014).

    If you are going to apply both a low-pass filter and a high-pass filter to the continuous EEG, you can apply these filters separately in two steps, or you can use a single band-pass filter that attenuates both the low and high frequencies in a single step. The result will be the same either way.

    Dealing with 50- or 60-Hz Line Noise

    If you have 50- or 60-Hz line noise in your data, a low-pass filter with a cutoff around 20 Hz can usually reduce it to insignificant levels. However, if this noise is huge, or if you don’t want to use a low-pass filter to remove it, I recommend avoiding notch filters (which attenuate one narrow band of frequencies and pass everything else). Instead, you can use EEGLAB’s cleanline plugin (see Bigdely-Shamlo et al., 2015 for important details). If cleanline doesn't work well for you, you can try the newer Zapline Plus method (de Cheveigné, 2020; Klug & Kloosterman, 2022). However, Zapline has not been as extensively tested (as of the time of this writing).

    Recommended Filter Settings

    The most difficult part about filtering is deciding on the specific filter to use (i.e., the cutoff frequency and the roll-off slope). In general, I recommend a roll-off of 12 dB/octave unless you really know what you’re doing. Choosing the cutoff frequency is much more complicated, because the optimal cutoff frequency depends on the nature of your ERPs, the amount and nature of the noise in the EEG, and whether you will be scoring amplitudes or latencies. And if you choose the wrong cutoff frequency, you might leave too much noise in your data, making it impossible to get statistically significant effects. Or you might choose a filter that dramatically distorts your waveforms, leading you to draw incorrect conclusions (as in the example given in the introduction to this chapter).

    My lab has developed a procedure for determining the optimal filter settings for a given situation that balances the need to reduce noise and the need to avoid serious waveform distortion (Zhang et al., 2024a). The next part of this chapter is devoted to giving you the background needed to understand this procedure, and the last part shows you how to implement the procedure in ERPLAB. However, you may not want to go through all of that, at least not right now. So, I will provide some simple and approximate advice here that you can use without reading the rest of the chapter.

    If you are doing research on typical cognitive or affective ERP components in a cooperative participant population, and you can get a decent number of trials per participant, you will probably be fine using a high-pass cutoff at 0.1 Hz and a low-pass cutoff at 20 Hz. This should reduce the noise reasonably well without producing significant waveform distortion. If your data has a lot more low-frequency noise (e.g., because you are studying infants or young children, or you are recording from people while they are moving around in the world), you should raise the high-pass cutoff to at least 0.2 Hz and possibly as high as 0.5 Hz (but at 0.5 Hz you risk some significant waveform distortion).

    I also have more specific recommendations that may be relevant for you. These recommendations come from a study (Zhang et al., 2024b) in which we applied our procedure for determining optimal filter settings to the 7 common ERP components from the ERP CORE (N170, MMN, P3b, N400, N2pc, LRP, ERN). The optimal filter settings are shown below in Table 4.1.

    If you are using these components (or similar components) in your research, and you are getting high-quality EEG data from cooperative participants, you should be able to use the filter settings shown in the table. For example, if you are looking at the P600 in a language study, our P3b or N400 settings will probably work well for you. However, the settings shown in Table 4.1 were derived from relatively clean EEG/ERP data that were obtained from highly motivated neurotypical college student participants using a high-quality EEG system with a gel-based conductive medium and an electrically shielded chamber. If you have noisier data, then our filter settings might not be appropriate for you. However, we also simulated noisier data by adding white noise to the EEG, and Table 4.1 indicates changes you should make if you have somewhat noisier data. But we did not simulate data with other kinds of noise or greater amounts of noise, so the settings shown in the table will not be appropriate for all research. 

    If you are recording from a much noisier population (e.g., infants) or using a lower-quality EEG system (e.g., a saline-based or dry electrode system), these settings may not be optimal for you. They may also be inappropriate if you are examining a component that is very different from the 7 components in the ERP CORE (e.g., short-duration components like the auditory brainstem responses or long-duration components such as the CDA). In these cases, I strongly recommend that you read the following sections and apply our procedure to your own data to determine the optimal filters.

    Table 4.1. Recommended half-amplitude filter cutoffs (with a roll-off of 12 dB/octave) for each combination of scoring method and ERP component in the ERP CORE (adapted from Zhang et al., 2024b)
      Mean amplitude Mean amplitude Peak amplitude Peak amplitude Peak latency Peak latency 50% area latency 50% area latency
      High-
    pass
    Low-
    pass
    High-
    pass
    Low-
    pass
    High-
    pass
    Low-
    pass
    High-
    pass
    Low-
    pass

    N170

    0.9

    ≥30
    or none

    0.9

    ≥30
    or none
    (or 30*)

    ≤0.9

    10-20

    10-20

    10-20

    MMN

    0.5

    ≥20
    or none

    0.5

    ≥20
    or none
    (or 30*)

    ≤0.5

    10
    (or 5†)

    10
    (or 5†)

    ≥20
    or none

    N2pc

    0.5

    ≥20
    or none

    0.5

    20-40
    (or 20*)

    0.01
    or none

    10

    10

    5
    (or 10‡)

    P3

    0.2

    ≥10
    or none

    0.2

    ≥10
    (or 10*)

    0.2

    10
    (or 5*)

    10
    (or 5*)

    10
    (or 5*)

    N400

    0.2

    ≥10
    or none

    0.2

    ≥10
    (or 10*)

    0.2

    10
    (or 5*)

    10
    (or 5*)

    10
    (or 5*)

    LRP

    0.3

    ≥30 or none

    0.3

    30
    (or 20*)

    0.3

    5
    (or 10‡)

    5
    (or 10‡)

    5
    (or 10‡)

    ERN

    0.4

    ≥20 or none

    0.4

    ≥20 or none

    0.4

    10

    10

    10

    *For data with moderate amounts of high-frequency noise

    †For data with moderate amounts of broadband noise (if distortion of onset and offset times can be tolerated)

    ‡To avoid distortion of onset and offset times

    Filters for Scoring Onset Latency

    Table 4.1 shows the optimal filters for scoring mean amplitude, peak amplitude, peak latency, and 50% area latency. If you want to score the onset latency of an ERP component, you may want a lower half-amplitude cutoff. My lab often applies a 10 Hz low-pass filter (12 dB/octave) to the averaged ERPs prior to scoring onset latency. We find that onset latency measures are highly sensitive to noise, and we get much better statistical power by filtering at 10 Hz. 

    This might seem problematic given that a 10 Hz cutoff produces a substantial distortion of the onset latency. However, when we quantify the onset latency of an ERP component, we don’t measure the time that the waveform first deviates from zero. Instead, we measure the time at which the voltage reaches 50% of the peak voltage (see Chapter 9 in Luck, 2014, for a justification of this approach). This 50% point is nearly identical for filtered and unfiltered waveforms in most cases. Also, we’re usually comparing the ERPs from two conditions that have both been filtered at 10 Hz, so the effect of the filtering should be equivalent for both conditions. However, we sometimes want to examine the absolute latency at which a difference wave first deviates from zero. In these cases, we do minimal filtering or we quantify the amount of latency shift produced by the filter (see, e.g., Bae & Luck, 2018).


    This page titled 4.5: Practical Advice About Filtering was last modified on Thu, 01 Oct 2026 18:52:57 GMT and is shared under a CC BY-NC 4.0 license and was authored, remixed, and/or curated by Steven J Luck.