erp pre-processing

57
DATA! NOW WHAT? Preparing your ERP data for analysis Dennis L. Molfese, Ph.D. Caitlin M. Hudac, B.A. Developmental Brain Lab University of Nebraska-Lincoln 1

Upload: vokhuong

Post on 14-Feb-2017

224 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ERP Pre-processing

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

Page 2: ERP Pre-processing

Agenda

Pre-processing

Preparing for analysis steps

2

Page 3: ERP Pre-processing

EEG to ERP

3

Page 4: ERP Pre-processing

EEG to ERP

4

Page 5: ERP Pre-processing

EEG to ERP

5

Page 6: ERP Pre-processing

Pre-processing in NetStation

6

Page 7: ERP Pre-processing

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

Page 8: ERP Pre-processing

FilteringFiltering reduces total frequencies by specific amounts

8

Page 9: ERP Pre-processing

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

Page 10: ERP Pre-processing

FILTERS CHANGE YOUR DATA!

10

Page 11: ERP Pre-processing

FILTERS CHANGE YOUR DATA!

11

Page 12: ERP Pre-processing

FILTERS CHANGE YOUR DATA!

12

Page 13: ERP Pre-processing

FILTERS CHANGE YOUR DATA!

13

Page 14: ERP Pre-processing

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

Page 15: ERP Pre-processing

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

Page 16: ERP Pre-processing

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

Page 17: ERP Pre-processing

SegmentationEvent markers:

Codes are linked to objects in EPrime.

17

Page 18: ERP Pre-processing

Segmentation

18

Page 19: ERP Pre-processing

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

Page 20: ERP Pre-processing

Segmentation

20

Page 21: ERP Pre-processing

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

Page 22: ERP Pre-processing

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

Page 23: ERP Pre-processing

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

Page 24: ERP Pre-processing

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

Page 25: ERP Pre-processing

Bad Channel Scan - shorted electrodes - bad scalp connection - 200 µV over segment

Eye Blinks & Movement -electrode pairs -differ by net type

Artifact Detection

25

Page 26: ERP Pre-processing

Eye Movements: 125 & 128

Eye Blinks:8 - 126, 26 - 127

Artifact Detection

26

Page 27: ERP Pre-processing

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

Page 28: ERP Pre-processing

Artifact Detection

28

Page 29: ERP Pre-processing

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

Page 30: ERP Pre-processing

Artifact RegressionSpherical interpolation

30

Page 31: ERP Pre-processing

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

Page 32: ERP Pre-processing

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

Page 33: ERP Pre-processing

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

Page 34: ERP Pre-processing

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

Page 35: ERP Pre-processing

Bad Channel Correction

No user settings. Instead, we interpolate missing channels using weighted average.

35

Page 36: ERP Pre-processing

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

Page 37: ERP Pre-processing

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

Page 38: ERP Pre-processing

Average Reference

38

Page 39: ERP Pre-processing

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

Page 40: ERP Pre-processing

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

Page 41: ERP Pre-processing

Automating analyses

Build scripts for each study.

Easy -- just drag and drop!

41

Page 42: ERP Pre-processing

Controversy of Order

Does the order of operation change the data?

• Baseline Correction • Re-referencing the data• Averaging segments

42

Page 43: ERP Pre-processing

1. Average2. Average reference3. Baseline correction

1. Average reference Average2. Baseline correction

1. Baseline correction Average2. Average reference

Controversy of Order

43

Page 44: ERP Pre-processing

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

Page 45: ERP Pre-processing

Exporting data

Use NetStation exporter (AVG --> RAW) then convert using Text Exporter program (RAW --> TXT)

Use File Export tool in Netstation

!

45

Page 46: ERP Pre-processing

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

Page 47: ERP Pre-processing

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

Page 48: ERP Pre-processing

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

Page 49: ERP Pre-processing

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

Page 50: ERP Pre-processing

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

Page 51: ERP Pre-processing

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

Page 52: ERP Pre-processing

!

For Temporal PCA analyses, “drag ‘n drop” text files.

MCAT Program

52

Page 53: ERP Pre-processing

!

MCAT Program

Subject 00001

Time points for “ba”

53

Page 54: ERP Pre-processing

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

Page 55: ERP Pre-processing

QUESTIONS ???

[email protected]@huskers.unl.edu

[email protected]

55

Page 56: ERP Pre-processing

MCAT

56

Page 57: ERP Pre-processing

MCAT to SPSS

57