<p>You kind of have to do some kind of baseline correction first (or a highpass filter on the unepoched data) because of slow drifting. Lowpass filtering before artifact rejection is fine as long as you don't ever go back to the unfiltered signal in your analyses.</p>

<p>After that, you can either throw out trials that exceed a set threshold, or you can do a two-step artifact rejection procedure. For the two-step rejection throw out anything beyond a large threshold. Then throw out any trials with points that exceed a set number of standard deviations from the mean of all trials at each time point.</p>

<p>The reason I say that filtering before artifact rejection is okay is because the artifacts that you are filtering out should not be related to the brain activity you are interested in. This is reasonable for frequencies above, say, 50Hz, because that should just be external and muscle noise. Anything lower than that could affect task-related brain activity, say eye movements for example. You might not want to include trials where the subject was looking away from the screen or closed their eyes.</p>

CC BY-SA 3.0
2016-04-14T21:19:54.927Z
Note that the last paragraph applies to artifact correction too. If the subject closes their eyes when a stimulus is presented, removing the EOG component and keeping the trial might not be a good idea.
K A
CC BY-SA 3.0
2016-04-14T21:18:16.723Z
2016-04-14T21:18:16.723Z
K A
<p>I am fairly new to EEG research and I am unsure what the best ordering is for preprocessing data. Do you correct for baseline and filter the data before you go on with artifact rejection/correction, or the other way around? </p>

<p>I can imagine the former to be correct, because baseline correction and filtering makes it easier to interpret the data visually, making it easier to identify artifacts. However, if you filter the data first, some artifacts may become less severe, making it difficult to have artifact rejection be done automatically. </p>

<p>What are your thoughts?</p>

<methodology><eeg><data><analysis>
In what order do you preprocess EEG data?
Robin Kramer-ten Have
# In what order do you preprocess EEG data?

(Asked by: username_0 on 2016-04-14)

I am fairly new to EEG research and I am unsure what the best ordering is for preprocessing data. Do you correct for baseline and filter the data before you go on with artifact rejection/correction, or the other way around?

I can imagine the former to be correct, because baseline correction and filtering makes it easier to interpret the data visually, making it easier to identify artifacts. However, if you filter the data first, some artifacts may become less severe, making it difficult to have artifact rejection be done automatically.

What are your thoughts?

**Tags:** methodology, eeg, data, analysis


---

## 1 answers

### Answer by username_1 on 2016-04-14. Score: 4 | Accepted answer

You kind of have to do some kind of baseline correction first (or a highpass filter on the unepoched data) because of slow drifting. Lowpass filtering before artifact rejection is fine as long as you don't ever go back to the unfiltered signal in your analyses.

After that, you can either throw out trials that exceed a set threshold, or you can do a two-step artifact rejection procedure. For the two-step rejection throw out anything beyond a large threshold. Then throw out any trials with points that exceed a set number of standard deviations from the mean of all trials at each time point.

The reason I say that filtering before artifact rejection is okay is because the artifacts that you are filtering out should not be related to the brain activity you are interested in. This is reasonable for frequencies above, say, 50Hz, because that should just be external and muscle noise. Anything lower than that could affect task-related brain activity, say eye movements for example. You might not want to include trials where the subject was looking away from the screen or closed their eyes.

> **Comments:**
> **username_1**: Note that the last paragraph applies to artifact correction too. If the subject closes their eyes when a stimulus is presented, removing the EOG component and keeping the trial might not be a good idea.  

---

