Pre-Processing of ERP Data Peter J. Molfese, Ph.D. Yale University
Before Statistical Analyses, Pre-Process the ERP data
Planning Analyses
Waveform Tools
Types of Tools Filter Segmentation Visual Review Artifact Detection, Bad Channel Correction, Baseline Correction, Average Reference (Montage Operation), Averaging Move on to Statistical Analyses
Filtering
Filtering Filtering reduces total frequencies by specific amounts: 60 Hz (50 Hz in Europe) Typical: 0.1-100 Hz 200 Series Amps: Select Low Pass (30 Hz)
Filtering 300 Series Amps (portables): First filtered using First Order High Pass Filter = 0.1 Then settings used in last slide. Do NOT mix data from 200 & 300 series amplifiers in any one study. If conducting a series of related studies, may want to use the same amplifiers.
More Filtering Filter to the level that you will analyze Filters are additive Can process a file many different ways e.g. Once at 0.1 to 30 hz and once at theta Filter all files in a project to the same level Data change every time they are filtered!
Segmentation Original data recorded is continuous EEG with markers included indicating stimulus events and subject response events (if programmed: e-prime). Segmentation breaks ongoing EEG into epochs Create categories for each stimulus Segment on stimulus, response, blink, startle, etc. Look for easy way to categorize trials into correct and incorrect responses
Segmentation - Part 1
Segmentation - Part 2
Segmentation - Part 3
Segmentation - Part 3
Segmentation - Part 4
Segmentation - Part 5
Segmentation - Part 5
Visual Inspection Check Eye channels: Could be bad because not contacting skin OR detecting eye blinks or eye movements. If bad across high number of trials, bad electrode and must be marked BAD for entire recording session would fail because of eye artifacts.
Visual Inspection Check Eye channels: Could be bad because not contacting skin OR detecting eye blinks or eye movements. If bad across high number of trials, bad electrode and must be marked BAD for entire recording session would fail because of eye artifacts.
Automating Analyses: Constructing a Script Script step 1 Filtering, then Segmentation You must filter before segmentation as filters flatten data at the beginning and end of each epoch
Automating Analyses: Constructing a Script Script step 1 Filtering, then Segmentation You must filter before segmentation as filters flatten data at the beginning and end of each epoch
Order of Operations Still have left: Artifact Detection Bad Channel Correction Baseline Correction Average Reference Averaging Does order make difference? controversy
Artifact Detection Examines segments for bad channels, eye blinks, and eye movements Can define artifacts by threshold Max-Min = 200µV is bad channel over segment Can define artifacts by slope of line Terms: fast-average, fast-amplitude Can define artifacts by modeling examples BESA
Artifact Detection Bad Channel Scan - shorted electrodes - bad scalp connection - 200 µv over segment Eye Blinks & Movement - between electrodes pair - differ by net type
Artifact Detection Eye Blinks & Movement - between electrodes pair - differ by net type
Eye Movements: 125 & 128 Eye Blinks: 8-126, 26-127
Things to Look Out For Problem: The algorithms can be too simple If eye channels detect an eye movement or blink, may mark the segment bad If an eye channel is bad, may mark all segments bad
Strategies First: Inspect Eye Channels Spherical Interpolation Check impedance levels from records Have Artifact Detection check for you. Second: Interpolate those bad channels Third: Continue processing files Baseline, Average Reference, Average
Bad Channel Correction
Artifact Regression Gratton, Coles, & Donchin (1983)
Automated ICA Joyce, C.A., Gorodntsky, I.F., Kutas, M. (2004) Automatic removal of eye movement and blink artifacts from EEG data using blind component separation
Bad Channel Replacement No User Settings - Interpolates Missing Channels Using Weighted Average
Average Important Strategies to keep in mind: Weighted Averaging Random Selection of Trials Early vs. Late in Experiment Equal Number of Averages / Condition Equal Number of Averages / Subject
Average Reference Re-referencing data Average Reference Defining a new zero point
Baseline Correction De-trend data from long slow oscillations in waveform
Baseline Correction Pre-stimulus period, usually 100-200 ms Average value for pre-stimulus points in baseline is calculated Average value subtracted from poststimulus period Important to avoid artifacts in baseline period!
Average Reference
Average Reference Data originally recorded represent difference between an electrode & reference (Cz) To reduce bias of particular reference, data re-referenced to the average reference
Averaging Average together all trials of particular stimulus (or condition) to form single waveform (average) composed of ALL presentations of that stimulus (or condition). Averaging = noise reduction technique Study: Randomly presented 100 /ba/ syllables intermixed with 100 presentations of /ga/. Separate averages constructed for /ba/ and /ga/, each based on their separate ~100 presentations.
1. Average 2. Average Reference 3. Baseline Correction
Controversy of Order Early vs. Late Baseline Correction baseline changes the data Early vs. Late Averaging OAR must be followed by baseline fix* Early vs. Late Re-Referencing of data Average Reference changes the data Better to average before/after baseline & referencing?
Analysis Order
1. Average 2. Average Reference 3. Baseline Correction 1. Ave Ref then Average 2. Baseline Correct 1. Baseline then Ave 2. Ave Ref
Benefits of Automation Increases Replicability Fairly easy to teach analysis steps High inter-rater reliability Batch processing of files
Statistical Extractions Peak Amplitude & Latency Define a window Have tool extract information from waveform Problems: Variability in waveforms trial-to-trial Variability from electrode to electrode
Export From NS Two Steps Convert to Text Files Use Matlab to Combine/Rotate Data
Change NS files from AVG to RAW: (1) Use NS File Exporter (in Extras folder of NS) Drag and drop AVE files Caution - name change (older version bug) (2) If names altered, use Convert to Text in Net Station or Net Station File Exporter 2.1 (3) Gives floating point simple binary conversion. RM_4452f_1_6x25.ave --> RM_4452f_1_6x25.RAW
(2) Text Export 2.1 program Converts RAW to Text Drag in RAW files, click CONVERT to generate TEXT files.
3. Can ALSO covert to text using FIILE EXPORT TOOL in Net station Waveform Tools.
4. Output = one text file for EACH condition.
MCAT Three Functions 1. Rotate data matrix for input to stat programs. 2. Concatenate subject data text files. 3. Combine electrode sites into regional electrodes.
MCAT Rotate Data Matrix BEFORE AFTER Channel 1 Data Pt 1 Channel 2 Data Pt 1 Channel 3 Data Pt 1 Channel 1 Data Pt 1 Channel 1 Data Pt 2 Channel 1 Data Pt 3 Channel 1 Data Pt 2 Channel 2 Data Pt 2 Channel 3 Data Pt 2 Channel 2 Data Pt 1 Channel 2 Data Pt 2 Channel 2 Data Pt 3 Channel 1 Data Pt 3 Channel 2 Data Pt 3 Channel 3 Data Pt 3 Channel 3 Data Pt 1 Channel 3 Data Pt 2 Channel 3 Data Pt 3 Suitable for Spatial PCA Suitable for Temporal PCA
Combine Electrodes into Regional Electrodes HydroCel Geodesic Sensor Net 256 Channel Map Version 1.0 243 242 241 31 238 239 240 244 32 25 234 245 235 37 18 33 19 246 26 236 Fp1 Fp2 248 46 10 38 11 230 27 20 247 34 12 237 249 47 2 231 54 F7 21 3 F8 1 252 39 28 13 226 250 35 4 232 22 14 253 48 29 5 222 55 40 223 221 225 15 251 254 61 36 224 23 Fz 220 227 233 6 41 214 67 49 F3 30 215 56 F4 213 255 16 7 212 219 228 62 42 24 207 206 211 73 50 8 205 218 256 68 57 43 17 198 197 204 210 229 63 51 196 203 58 44 9 186 185 195 69 59 52 202 82 64 184 REF 183 194 T3 C3 T4 217 CZ C4 65 45 132 70 53 144 182 193 60 81 155 91 71 66 164 74 72 80 131 181 173 216 79 90 143 192 75 78 154 180 92 76 77 89 130 163 172 209 83 COM 88 142 191 84 86 93 87 101 153 162 94 85 100 129 179 P3 P4 171 201 Pz 190 LM 99 141 RM 102 95 98 110 T5 96 97 119 128 152 178 208 161 103 170 T6 109 140 200 104 118 127 108 151 189 105 106 107 160 117 139 169 177 111 126 199 112 116 150 113 114 115 125 138 159 188 168 176 124 149 O1 137 O2 123 Oz 158 120 121 122 167 175 187 136 148 133 134 145 135 146 147 S/N 156 157 165 166 174 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: support@egi.com or info@egi.com
Combine Electrodes into Regional Electrodes HydroCel Geodesic Sensor Net 256 Channel Map Version 1.0 243 242 241 31 238 239 240 244 32 25 234 245 235 37 18 33 19 246 26 236 Fp1 Fp2 248 46 10 38 11 230 27 20 247 34 12 237 249 47 2 231 54 F7 21 3 F8 1 252 39 28 13 226 250 35 4 232 22 14 253 48 29 5 222 55 40 223 221 225 15 251 254 61 36 224 23 Fz 220 227 233 6 41 214 67 49 F3 30 215 56 F4 213 255 16 7 212 219 228 62 42 24 207 206 211 73 50 8 205 218 256 68 57 43 17 198 197 204 210 229 63 51 196 203 58 44 9 186 185 195 69 59 52 202 82 64 184 REF 183 194 T3 C3 T4 217 CZ C4 65 45 132 70 53 144 182 193 60 81 155 91 71 66 164 74 72 80 131 181 173 216 79 90 143 192 75 78 154 180 92 76 77 89 130 163 172 209 83 COM 88 142 191 84 86 93 87 101 153 162 94 85 100 129 179 P3 P4 171 201 Pz 190 LM 99 141 RM 102 95 98 110 T5 96 97 119 128 152 178 208 161 103 170 T6 109 140 200 104 118 127 108 151 189 105 106 107 160 117 139 169 177 111 126 199 112 116 150 113 114 115 125 138 159 188 168 176 124 149 O1 137 O2 123 Oz 158 120 121 122 167 175 187 136 148 133 134 145 135 146 147 S/N 156 157 165 166 174 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: support@egi.com or info@egi.com
18 Regions - 256 HydroCel LOR 22 26 27 28 29 32 33 34 35 37 38 39 46 47 54 ROR 1 2 3 4 5 10 11 12 13 14 18 19 20 21 25 31 LIF 241 242 243 244 245 246 247 248 249 250 251 252 253 254 RIF 225 226 227 230 231 232 233 234 235 236 237 238 239 240 LPF 9 15 16 17 23 24 30 36 40 41 42 43 44 48 49 50 51 RPF 6 7 8 185 186 197 197 198 205 206 207 213 214 215 222 223 224 LIT 73 82 91 92 93 102 103 111 255 256 RIT 199 200 201 208 209 216 217 218 228 229 LT 55 56 57 58 61 62 63 64 67 68 69 70 71 74 75 76 83 RT 172 180 181 191 192 193 194 195 202 203 204 210 211 212 219 220 221 LP 45 52 53 59 60 65 66 72 77 78 79 80 81 86 87 88 89 97 98 99 100 101 110 RP 90 119 128 129 130 131 132 141 142 143 144 152 153 154 155 161 162 163 164 173 182 183 184 LTP 84 85 94 95 96 104 105 106 112 113 RTP 169 170 171 176 177 178 179 188 189 190 LO 107 108 109 114 115 116 117 118 120 121 122 123 124 125 137 RO 126 127 138 139 140 149 150 151 158 159 160 167 168 175 187 LIO 133 134 135 136 145 146 RIO 147 148 156 157 165 166 174
Combine Electrodes into Regional Electrodes
MCAT For Temporal PCA Analyses
MCAT Drag & Drop text files For Temporal PCA Analyses!
MCAT!
MCAT
MCAT to SPSS
Benefits: Temporal PCA Plotting Programs DeltaGraph, Excel, BLOT Mathematica Imports
QUESTIONS??? pmolfese@mac.com dlmolfese@mac.com