EEG Methods

The goal of this course is to learn EEG from scratch, with a focus on two popular analysis techniques in psycholinguistics: ERPs and time-frequency decomposition. When the course is finished, you should be able to collect, process, plot, and statistically analyze EEG data.

Here is a syllabus for Fall 2020.

Component I: Textbooks

There are two textbooks out there for EEG in cognitive science that are absolutely terrific. Honestly, these two textbooks together provide a complete introduction to the two main analysis techniques in the literature: ERPs and time-frequency decomposition. You could just read these carefully, and be ready to do your own EEG research. The point of this course is to supplement the material in those textbooks to help really solidify the content... and to give you hands on practice doing the analyses.

book notes
Steve Luck: An introduction to the event-related potential technique This is the book to start with. It provides a gentle introduction to EEG, and a complete introduction to the ERP technique.
Mike X Cohen: Analyzing neural time series data This the book to buy if you are interested in time-frequency decomposition. It assumes some familiarity with EEG and ERPs.

Component II: Software

EEG analysis requires a framework for scientific computing. In principle, you can choose from Matlab, Python, and R (see the slides for more information). In practice, Matlab has the most well-developed tools for EEG analysis. Therefore, for this course, we will use Matlab.

Here are the pieces of software you will need to install on your computer, and in some cases, supplementary material to help you learn more about the software.

software purpose
MATLAB (free for UConn students) This is the language we will use. After installation, you will need to update it (currently update 4) to run EEGLAB.
Mike X Cohen: Matlab for Brain and Cognitive Scientists Cohen wrote a textbook for Matlab. It is a great companion to his time-frequency book.
EEGLAB (free) This is a MATLAB toolbox for EEG analysis. It requires you to update Matlab 2018a to update 4.
ERPLAB (free) This is a plugin for EEGLAB written by Steve Luck to make ERP analysis easier. It will be our primary tool for ERP analysis.
BVA import (free) This is a plugin for EEGLAB to import data in the format that our Brain Products EEG system uses.
Mass Univariate Toolbox (free) This is a MATLAB toolbox for statistical analysis of ERP data. We will use it with ERPLAB.
Factorial Mass Univariate Toolbox (free) This extends the mass univariate toolbox to factorial designs. We probably won't use it, but it may be useful.
FieldTrip (free) This is another MATLAB toolbox for EEG analysis. We will use it for time-frequency decomposition. It also does statistics for time-frequency results.
Modified FieldTrip function Fieldtrip knows that Brain Products triggers have S's and R's in them. I remove the S's and R's, so I modified one of the fieldtrip functions. You need to place it in this folder inside your Matlab installation: \fieldtrip\trialfun.
RStudio (free) R is a free language for statistical analysis and plotting. We will use it to make pretty plots. RStudio is a graphical user interface that makes using R easier.
Garrett Grolemund and Hadley Wickham: R for Data Science This is a free book written by the creators of RStudio to explain a number of packages (the tidyverse) that they have created to make data analysis easier in R.

Component III: Sample Data

We will use a real (sentence final) N400 experiment for our sample data. I have linked data from 12 participants below, split into groups of 3 to keep the file sizes reasonable (about 750MB each). There were 36 participants in the experiment in total. Please contact me if the data from the other 24 participants would be helpful.

participants 1-3 participants 4-6 participants 7-9 participants 10-12 Description of the experiment

Component IV: Schedule, Readings, Scripts, and Links

I created a set of slides to accompany the ERP part of this course up through the section on mass univariate permutation tests. Here is the full set: keynote version | pdf version [last updated 10.10.20]. I will reference the relevant sections in the schedule below.

There are also two standalone sets of slides (one on ANOVAs/LMEMs, and one on bits of math for time-frequency decomposition). I've linked those directly in the relevant section of the schedule below.

topic slides readings materials
Introduction section 1 Luck 1
Luck 2
Fundamentals section 2 Luck 2
Jackson and Bolger 2014
An interactive tutorial on sine waves and Fourier transform
A second interactive tutorial
Hands-on training Luck 5
The ERP processing pipeline in ERPLAB section 4 (1-9) Luck 6
Luck 9
an example script for ERPLAB
an example eventlist
an example rereference script
Plotting ERPs section 4 (10) script to export ERPs
script for waveforms
script for topoplots
exported ERPs
example plots
Measurements of ERPs section 4 (11) Luck 9
Luck 10
Multiple comparisons and mass univariate permutation tests section 4 (12) Groppe et al. 2011 R script to demonstrate the multiple comparisons problem
example data
Traditional ANOVAs and LMEMs keynote or pdf
(these are not part of the full set above)
list of ERPs for measurements
exported measurements
R script for ANOVAs
The ERP processing pipeline in FieldTrip preprocessing script
ERP script
The dot-product and convolution keynote or pdf
(these are not part of the full set above)
Cohen 10 A youtube series on linear algebra
an applet demonstrating the dot product
another explanation of the dot product
a real world example of convolution
an applet demonstrating convolution
Complex waves and Morlet wavelets keynote or pdf
(these are not part of the full set above)
Cohen 12
Cohen 13
Time-frequency in Fieldtrip preprocessing script (identical to the one above, but without low-pass filtering)
Morlet wavelet script
example TF data (to demonstrate plotting and stats)
Designing EEG experiments Luck 4
Duncan et al. 2009
The probabilistic prediction (word pre-activation) debate Delong et al. 2005
9 labs replication 2018
Delong et al. 2017
Ito et al. 2017a
Ito et al. 2017b
Yan et al. 2018

Additional resources

I've done my best to create a comprehensive introduction to EEG on this page. But I am just one person with my own limited experiences. There are lots of resources out there. Here I list a few that I have found myself consulting recently.

link notes Resources The Luck lab has created a number of resources for learning EEG, including an intro course, a sample data set, and a bootcamp course.
MNE Python tutorials MNE Python is another software solution for analyzing M/EEG data (with an original focus on source localization). I do not cover it in this course (yet), but there are a number of tutorials online.
Comparing toolkits The fieldtrip group organized a workshop comparing three toolkits: fieldtrip, MNE python, and brainstorm.
Advanced fieldtrip The fieldtrip group organizes a number of workshops each year. This one focused on advanced analysis techniques in fieldtrip.
Python neurobootcamp OHSU organized a workshop for neuroscientists who want to use Python in their analysis pipeline (for behavioral, electrophysiological, and imaging studies).

368 Oak Hall


My current local time is .