pre-processing of erp data - university of...

67
Pre-Processing of ERP Data© Peter J. Molfese, Ph.D. Yale University Friday, January 14, 2011

Upload: others

Post on 11-Mar-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Pre-Processing ofERP Data©

Peter J. Molfese, Ph.D.Yale University

Friday, January 14, 2011

Before Statistical Analyses, Pre-Process the ERP data

Friday, January 14, 2011

Planning Analyses

Friday, January 14, 2011

Waveform Tools

Friday, January 14, 2011

Friday, January 14, 2011

Friday, January 14, 2011

Friday, January 14, 2011

Types of Tools

• Filter

• Segmentation

• Visual Review

• Artifact Detection, Bad Channel Correction, Baseline Correction, Average Reference (Montage Operation), Averaging

• Move on to Statistical Analyses

Friday, January 14, 2011

Filtering

Friday, January 14, 2011

FilteringFiltering 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)

Friday, January 14, 2011

Filtering300 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.

Friday, January 14, 2011

More Filtering

• Filter to the level that you will analyze

• 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

• Filters are additive

• Data change every time they are filtered!

Friday, January 14, 2011

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

• Segment on stimulus, response, blink, startle, etc.

• Create categories for each stimulus

• Look for easy way to categorize trials into correct and incorrect responses

Friday, January 14, 2011

Segmentation - Part 1

Friday, January 14, 2011

Segmentation - Part 2

Friday, January 14, 2011

Segmentation - Part 3

Friday, January 14, 2011

Segmentation - Part 3

Friday, January 14, 2011

Segmentation - Part 4

Friday, January 14, 2011

Segmentation - Part 5

Friday, January 14, 2011

Segmentation - Part 5

Friday, January 14, 2011

Visual InspectionCheck 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.

Friday, January 14, 2011

Visual InspectionCheck 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.

Friday, January 14, 2011

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

Friday, January 14, 2011

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

Friday, January 14, 2011

Order of Operations

• Still have left:

• Artifact Detection

• Bad Channel Correction

• Baseline Correction

• Average Reference

• Averaging

• “Does order make difference?” controversy

Friday, January 14, 2011

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

• BESAFriday, January 14, 2011

Artifact DetectionBad Channel Scan

- shorted electrodes - bad scalp connection - 200 µV over segment

Eye Blinks & Movement - between electrodes pair - differ by net type

Friday, January 14, 2011

Artifact DetectionEye Blinks & Movement

- between electrodes pair - differ by net type

Friday, January 14, 2011

Eye Movements: 125 & 128

Eye Blinks:8 - 126, 26 - 127

Friday, January 14, 2011

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

Friday, January 14, 2011

Friday, January 14, 2011

Strategies

• First: Inspect Eye Channels

• Check impedance levels from records

• Have Artifact Detection check for you.

• Second: Interpolate those bad channels

• Spherical Interpolation

• Third: Continue processing files

• Baseline, Average Reference, Average

Friday, January 14, 2011

Bad Channel CorrectionFriday, January 14, 2011

Artifact Regression• Gratton, Coles, & Donchin (1983)

Friday, January 14, 2011

“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

Friday, January 14, 2011

Bad Channel Replacement

No User Settings - Interpolates Missing ChannelsUsing Weighted Average

Friday, January 14, 2011

Average• 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

Friday, January 14, 2011

Average Reference

• Re-referencing data

• Defining a new “zero point”

• Average Reference

Friday, January 14, 2011

Baseline Correction

• De-trend data from long slow oscillations in waveform

Friday, January 14, 2011

Baseline Correction• Pre-stimulus period, usually 100-200 ms

• Average value for pre-stimulus points in baseline is calculated

• Average value subtracted from post-stimulus period

• Important to avoid artifacts in baseline period!

Friday, January 14, 2011

Average Reference

Friday, January 14, 2011

Average Reference

Data originally recorded represent differencebetween an electrode & reference (Cz)

To reduce bias of particular reference, data re-referenced to the average reference

Friday, January 14, 2011

AveragingAverage 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 intermixedwith 100 presentations of /ga/.

Separate averages constructed for /ba/ and /ga/, each based on their separate ~100 presentations.

Friday, January 14, 2011

1. Average

2. Average Reference

3. Baseline Correction

Friday, January 14, 2011

Controversy of Order

• Early vs. Late Baseline Correction

• baseline changes the data

• OAR must be followed by baseline fix*

• Early vs. Late Re-Referencing of data

• Average Reference changes the data

• Early vs. Late Averaging

• Better to average before/after baseline & referencing?

Friday, January 14, 2011

Analysis Order

Friday, January 14, 2011

1. Average

2. Average Reference

3. Baseline Correction

1. Ave Ref then Average

2. Baseline Correct

1. Baseline then Ave

2. Ave RefFriday, January 14, 2011

Benefits of Automation

• Increases Replicability

• Fairly easy to teach analysis steps

• High inter-rater reliability

• Batch processing of files

Friday, January 14, 2011

• Peak Amplitude & Latency

• Define a window

• Have tool extract information from waveform

• Problems:

• Variability in waveforms trial-to-trial

• Variability from electrode to electrode

Statistical Extractions

Friday, January 14, 2011

Export From NS

• Two Steps

• Convert to Text Files

• Use Matlab to Combine/Rotate Data

Friday, January 14, 2011

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””

Friday, January 14, 2011

(2) Text Export 2.1 program Converts RAW to Text

Drag in RAW files, click “CONVERT” to generate TEXT files.

Friday, January 14, 2011

3. Can ALSO covert to text using FIILE EXPORT TOOL in “Net station Waveform Tools”.

!

Friday, January 14, 2011

4. Output = one text file for EACH condition.

!Friday, January 14, 2011

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.

Friday, January 14, 2011

Rotate Data Matrix

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 1Data Pt 2

Channel 1Data Pt 3

Channel 2Data Pt 1

Channel 2Data Pt 2

Channel 2Data Pt 3

Channel 3Data Pt 1

Channel 3Data Pt 2

Channel 3Data Pt 3

BEFORE AFTER

MCAT

Suitable for Temporal PCASuitable for Spatial PCA

Friday, January 14, 2011

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]

Combine Electrodes into Regional Electrodes

Friday, January 14, 2011

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]

Combine Electrodes into Regional Electrodes

Friday, January 14, 2011

LOR 22 26 27 28 29 32 33 34 35 37 38 39 46 47 54ROR 1 2 3 4 5 10 11 12 13 14 18 19 20 21 25 31LIF 241 242 243 244 245 246 247 248 249 250 251 252 253 254RIF 225 226 227 230 231 232 233 234 235 236 237 238 239 240LPF 9 15 16 17 23 24 30 36 40 41 42 43 44 48 49 50 51RPF 6 7 8 185 186 197 197 198 205 206 207 213 214 215 222 223 224LIT 73 82 91 92 93 102 103 111 255 256RIT 199 200 201 208 209 216 217 218 228 229LT 55 56 57 58 61 62 63 64 67 68 69 70 71 74 75 76 83RT 172 180 181 191 192 193 194 195 202 203 204 210 211 212 219 220 221LP 45 52 53 59 60 65 66 72 77 78 79 80 81 86 87 88 89 97 98 99 100 101 110RP 90 119 128 129 130 131 132 141 142 143 144 152 153 154 155 161 162 163 164 173 182 183 184LTP 84 85 94 95 96 104 105 106 112 113RTP 169 170 171 176 177 178 179 188 189 190LO 107 108 109 114 115 116 117 118 120 121 122 123 124 125 137RO 126 127 138 139 140 149 150 151 158 159 160 167 168 175 187LIO 133 134 135 136 145 146RIO 147 148 156 157 165 166 174

18 Regions - 256 HydroCel

Friday, January 14, 2011

Combine Electrodes into Regional Electrodes

Friday, January 14, 2011

For Temporal PCA Analyses

MCAT

Friday, January 14, 2011

For Temporal PCA Analyses

MCAT

!

Drag & Drop text

files

Friday, January 14, 2011

MCAT

!

Friday, January 14, 2011

MCAT

Friday, January 14, 2011

MCAT to SPSS

Friday, January 14, 2011

• Benefits:

• Temporal PCA

• Plotting Programs

• DeltaGraph, Excel, BLOT

• Mathematica Imports

Friday, January 14, 2011