erp pre-processing
TRANSCRIPT
DATA! NOW WHAT?Preparing your ERP data
for analysis
Dennis L. Molfese, Ph.D.
Caitlin M. Hudac, B.A.
Developmental Brain LabUniversity of Nebraska-Lincoln
1
Agenda
Pre-processing
Preparing for analysis steps
2
EEG to ERP
3
EEG to ERP
4
EEG to ERP
5
Pre-processing in NetStation
6
ERP Pre-processingFilterFix high/low frequencies
SegmentationNeed to chop up EEG into ERP
Artifact detectionFix blinks, muscle movements, etc.
Artifact rejection
Bad channel correction
Channels with poor signal (e.g impedance, bad electrode)
AveragingRe-reference; combine trials
Baseline correction
ERP signal “level” may vary for each segment
7
FilteringFiltering reduces total frequencies by specific amounts
8
Filtering“60 cycle”: Without proper grounding, impedance between electrode and amplifier can become very large.
Causes: skin-to-skin contact, high-frequency interference from nearby electrical devices.
Adjust using a notch filter
9
FILTERS CHANGE YOUR DATA!
10
FILTERS CHANGE YOUR DATA!
11
FILTERS CHANGE YOUR DATA!
12
FILTERS CHANGE YOUR DATA!
13
Filtering
Keep in mind:
Filters are additive -- the data changes each time you filter.
Use same filter settings (and amplifiers) for one dataset.
Try different filters out.
14
ERP Pre-processingFilterFix high/low frequencies
SegmentationNeed to chop up EEG into ERP
Artifact detectionFix blinks, muscle movements, etc.
Artifact rejection
Bad channel correction
Channels with poor signal (e.g impedance, bad electrode)
AveragingRe-reference; combine trials
Baseline correction
ERP signal “level” may vary for each segment
15
Segmentation
Raw EEG signal “stamped” with stimulus event markers.
Segments are the length we want to choose for our ERP.
Can be different for each kind of stimulus.
16
SegmentationEvent markers:
Codes are linked to objects in EPrime.
17
Segmentation
18
SegmentationOffsets:
Actual display of object will depend on the connection between PC (EPrime) and Mac (NetStation) computers.
PC sends stimulus
Stimulus presented
NetStation marks EEG
Time
Stimulus Offset
ba 6
da 4
ga 4
bu 5
du 7
gu 6
Offset
19
Segmentation
20
Segmentation
Visual InspectionEye channels could be poor due to no contact with skin or blinks/eye movements.
If poor across high number of trials, electrode must be marked “BAD” for entire recording.
21
ERP Pre-processingFilterFix high/low frequencies
SegmentationNeed to chop up EEG into ERP
Artifact detectionFix blinks, muscle movements, etc.
Artifact rejection
Bad channel correction
Channels with poor signal (e.g impedance, bad electrode)
AveragingRe-reference; combine trials
Baseline correction
ERP signal “level” may vary for each segment
22
Artifact Strategy
First: Artifact Detection • Inspect Eye Channels• Check impedance levels from records• Have Artifact Detection check for you.Second: Artifact Rejection• Replace bad channels through spherical
interpolation
23
What electrodes have bad or noisy signal?
Bad channels
Eye blinks
Eye movements
Define artifacts by threshold.
Ex: Max-Min = 200µV is bad channel over segment.
Define artifacts by slope of line -- how quickly does the signal change?
Define artifacts by modeling examples.
Artifact Detection
24
Bad Channel Scan - shorted electrodes - bad scalp connection - 200 µV over segment
Eye Blinks & Movement -electrode pairs -differ by net type
Artifact Detection
25
Eye Movements: 125 & 128
Eye Blinks:8 - 126, 26 - 127
Artifact Detection
26
Be careful:
The algorithms can be too simple.
If eye channels detect an eye movement or blink, NetStation may mark the segment bad.
If an eye channel is bad, may mark all segments bad.
Artifact Detection
27
Artifact Detection
28
ERP Pre-processingFilterFix high/low frequencies
SegmentationNeed to chop up EEG into ERP
Artifact detectionFix blinks, muscle movements, etc.
Artifact rejection
Bad channel correction
Channels with poor signal (e.g impedance, bad electrode)
AveragingRe-reference; combine trials
Baseline correction
ERP signal “level” may vary for each segment
29
Artifact RegressionSpherical interpolation
30
Artifact Regression• NetStation uses an “automatic ICA”
• Automatically removes eye movement and blink artifacts using blind component separation.
Prior to artifact regression
After artifact regression
(Joyce, Gorodnitsky, & Kutas, 2004)
with ocular artifacts
without ocular artifacts
31
ERP Pre-processingFilterFix high/low frequencies
SegmentationNeed to chop up EEG into ERP
Artifact detectionFix blinks, muscle movements, etc.
Artifact rejection
Bad channel correction
Channels with poor signal (e.g impedance, bad electrode)
AveragingRe-reference; combine trials
Baseline correction
ERP signal “level” may vary for each segment
32
Baseline Correction• Important to avoid artifacts in baseline period!• Adjust pre-stimulus value (e.g. 100-200 ms) by
averaging across pre-stimulus points during baseline. • Subtract average value from post-stimulus period.
33
ERP Pre-processingFilterFix high/low frequencies
SegmentationNeed to chop up EEG into ERP
Artifact detectionFix blinks, muscle movements, etc.
Artifact rejection
Bad channel correction
Channels with poor signal (e.g impedance, bad electrode)
AveragingRe-reference; combine trials
Baseline correction
ERP signal “level” may vary for each segment
34
Bad Channel Correction
No user settings. Instead, we interpolate missing channels using weighted average.
35
ERP Pre-processingFilterFix high/low frequencies
SegmentationNeed to chop up EEG into ERP
Artifact detectionFix blinks, muscle movements, etc.
Artifact rejection
Bad channel correction
Channels with poor signal (e.g impedance, bad electrode)
AveragingRe-reference; combine trials
Baseline correction
ERP signal “level” may vary for each segment
36
Average Reference
Why re-reference? Data originally recorded to represent the difference between an electrode and reference (Cz).
Define a new “zero point”.
Using an average reference reduces the bias of a particular reference.
37
Average Reference
38
Averaging trials•Averaging is a noise reduction technique.•Combine trials to form a single averaged waveform.
What trials to average?• same condition (happy faces)• all stimulus of one type (happy,
angry, and fearful faces)
39
Important Strategies to keep in mind:
Equal Number of Averages / Condition
Equal Number of Averages / Subject
Weighted Averaging
Random Selection of Trials
Early vs. Late in Experiment
Averaging
40
Automating analyses
Build scripts for each study.
Easy -- just drag and drop!
41
Controversy of Order
Does the order of operation change the data?
• Baseline Correction • Re-referencing the data• Averaging segments
42
1. Average2. Average reference3. Baseline correction
1. Average reference Average2. Baseline correction
1. Baseline correction Average2. Average reference
Controversy of Order
43
Pre-processed data: Now what?
Perform NetStation analyses
Peak amplitude /latency
Export data to work in statistical package of choice (e.g. SPSS, SAS, MATLAB).
Rotate the data?
Combine regional electrodes?
44
Exporting data
Use NetStation exporter (AVG --> RAW) then convert using Text Exporter program (RAW --> TXT)
Use File Export tool in Netstation
!
45
Exporting dataBE CAREFUL ABOUT FILE NAMING!
One text file per person per condition
00001_6x25.ave_ba.txt00001_6x25.ave_da.txt00001_6x25.ave_ga.txt00001_6x25.ave_bu.txt00001_6x25.ave_du.txt00001_6x25.ave_gu.txt00001_6x25.ave.RAW00002_6x25.ave_ba.txt00002_6x25.ave_da.txt00002_6x25.ave_ga.txt00002_6x25.ave_bu.txt00002_6x25.ave_du.txt00002_6x25.ave_gu.txt00002_6x25.ave.RAW
46
1. Rotate data matrix for input to stat programs.2. Concatenate subject data text files.3. Combine electrode sites into regional electrodes.
MCAT Program
47
BEFORE AFTER
Suitable for Temporal PCASuitable for Spatial PCA
MCAT Program1. Rotate data matrix for input to stat programs.2. Concatenate subject data text files.3. Combine electrode sites into regional electrodes.
Channel 1Data Pt 1
Channel 2Data Pt 1
Channel 3Data Pt 1
Channel 1Data Pt 2
Channel 2Data Pt 2
Channel 3Data Pt 2
Channel 1Data Pt 3
Channel 2Data Pt 3
Channel 3Data Pt 3
Channel 1Data Pt 1
Channel 2Data Pt 1
Channel 3Data Pt 1
Channel 1Data Pt 2
Channel 2Data Pt 2
Channel 3Data Pt 2
Channel 1Data Pt 3
Channel 2Data Pt 3
Channel 3Data Pt 3
48
MCAT Program1. Rotate data matrix for input to stat programs.2. Concatenate subject data text files.3. Combine electrode sites into regional electrodes.
00001_6x25.ave_ba.txt
00001_6x25.ave_da.txt
00001_6x25.ave_ga.txt
00001_6x25.ave_bu.txt
00001_6x25.ave_du.txt
00001_6x25.ave_gu.txt
00001_6x25.ave.RAW
00001_6x25.ave_ba.txt +00001_6x25.ave_da.txt +00001_6x25.ave_ga.txt +00001_6x25.ave_bu.txt +00001_6x25.ave_du.txt +00001_6x25.ave_gu.txt
00001_6x25.ave.RAW
49
REF
CZ
101
Pz
COM
15387
36 224
59
C3
183
C4
21
37 18
47
F7
2
F8
116 150
17096
202
T4
69
T3
13
4
5
6
7
8
9
1011
12
13
14
15
Fz
16
17
19
Fp2
20
22
23
24
25
26
27
28
29
30
31
32
33
Fp1
34
35
38
39
40
41
F3
42
43
44
45
46
48
49
50
51
52
53
54
55
56
57
58
60
61
62
63
64
65
66
67
68
70
7172
186
198
207
215
74
7576 77
7879
80
81
73
253
252
248
249
254
255
256
251
250
241
244
242
245
243
246
247
82
83
8485
86
P3
88
89
90
91
92
9394
LM95
T5 9798
99
100
102
103
104105
106 107108
109
110
111
112
113 114115
117
118
119
120 121 122123
124
O1
125
126
127
128
129
130
131
133134
135
136
137
Oz
138
139
140
141
142
143
145
146
147
148
149
O2
151
152
154
155
156
157
158
159
160
161
162
P4
163
164173
165
166
S/N
174
167
168
169
171
172
132144
175
176
177
178
T6
179
180
181
182
187
188
189
190
RM
191
192
193
194184185
195196
197
199
200
201
210
208
209
216
217
218
203
204205
206
214
F4
211
212213 219
220
221222
223 225
226
227
228
229
230
231
232
233
234235
236
237
238 239240
HydroCel Geodesic Sensor Net
256 Channel MapVersion 1.0
For questions or additional assistance please refer to the EGI Sensor Net Technical Manual or contact us at:
Electrical Geodesics, Inc.
1600 Millrace Drive, Suite 307
Eugene, Oregon 97403
Phone: (541) 687-7962 Fax:(541) 687-7963
Email: [email protected] or [email protected]
MCAT Program1. Rotate data matrix for input to stat programs.2. Concatenate subject data text files.3. Combine electrode sites into regional electrodes.
REF
CZ
101
Pz
COM
15387
36 224
59
C3
183
C4
21
37 18
47
F7
2
F8
116 150
17096
202
T4
69
T3
13
4
5
6
7
8
9
1011
12
13
14
15
Fz
16
17
19
Fp2
20
22
23
24
25
26
27
28
29
30
31
32
33
Fp1
34
35
38
39
40
41
F3
42
43
44
45
46
48
49
50
51
52
53
54
55
56
57
58
60
61
62
63
64
65
66
67
68
70
7172
186
198
207
215
74
7576 77
7879
80
81
73
253
252
248
249
254
255
256
251
250
241
244
242
245
243
246
247
82
83
8485
86
P3
88
89
90
91
92
9394
LM95
T5 9798
99
100
102
103
104105
106 107108
109
110
111
112
113 114115
117
118
119
120 121 122123
124
O1
125
126
127
128
129
130
131
133134
135
136
137
Oz
138
139
140
141
142
143
145
146
147
148
149
O2
151
152
154
155
156
157
158
159
160
161
162
P4
163
164173
165
166
S/N
174
167
168
169
171
172
132144
175
176
177
178
T6
179
180
181
182
187
188
189
190
RM
191
192
193
194184185
195196
197
199
200
201
210
208
209
216
217
218
203
204205
206
214
F4
211
212213 219
220
221222
223 225
226
227
228
229
230
231
232
233
234235
236
237
238 239240
HydroCel Geodesic Sensor Net
256 Channel MapVersion 1.0
For questions or additional assistance please refer to the EGI Sensor Net Technical Manual or contact us at:
Electrical Geodesics, Inc.
1600 Millrace Drive, Suite 307
Eugene, Oregon 97403
Phone: (541) 687-7962 Fax:(541) 687-7963
Email: [email protected] or [email protected]
256 Hydrocel Net50
MCAT Program
REF
CZ
101
Pz
COM
15387
36 224
59
C3
183
C4
21
37 18
47
F7
2
F8
116 150
17096
202
T4
69
T3
13
4
5
6
7
8
9
1011
12
13
14
15
Fz
16
17
19
Fp2
20
22
23
24
25
26
27
28
29
30
31
32
33
Fp1
34
35
38
39
40
41
F3
42
43
44
45
46
48
49
50
51
52
53
54
55
56
57
58
60
61
62
63
64
65
66
67
68
70
7172
186
198
207
215
74
7576 77
7879
80
81
73
253
252
248
249
254
255
256
251
250
241
244
242
245
243
246
247
82
83
8485
86
P3
88
89
90
91
92
9394
LM95
T5 9798
99
100
102
103
104105
106 107108
109
110
111
112
113 114115
117
118
119
120 121 122123
124
O1
125
126
127
128
129
130
131
133134
135
136
137
Oz
138
139
140
141
142
143
145
146
147
148
149
O2
151
152
154
155
156
157
158
159
160
161
162
P4
163
164173
165
166
S/N
174
167
168
169
171
172
132144
175
176
177
178
T6
179
180
181
182
187
188
189
190
RM
191
192
193
194184185
195196
197
199
200
201
210
208
209
216
217
218
203
204205
206
214
F4
211
212213 219
220
221222
223 225
226
227
228
229
230
231
232
233
234235
236
237
238 239240
HydroCel Geodesic Sensor Net
256 Channel MapVersion 1.0
For questions or additional assistance please refer to the EGI Sensor Net Technical Manual or contact us at:
Electrical Geodesics, Inc.
1600 Millrace Drive, Suite 307
Eugene, Oregon 97403
Phone: (541) 687-7962 Fax:(541) 687-7963
Email: [email protected] or [email protected]
256 Hydrocel Net
1. Rotate data matrix for input to stat programs.2. Concatenate subject data text files.3. Combine electrode sites into regional electrodes.
51
!
For Temporal PCA analyses, “drag ‘n drop” text files.
MCAT Program
52
!
MCAT Program
Subject 00001
Time points for “ba”
53
Summary
Pre-processing involves making informed decisions about your data!
Review the literature for similar paradigms to decide how to start.
Make a plan -- be prepared and organized.
It’s okay to revise your plan!
54
MCAT
56
MCAT to SPSS
57