Opening the book…
This section of Chapter 1 provides some important background information that you need to know to make effective use of this book. The whole book will make much more sense if you read this section first!
The Goal of This Book
The primary goal of this book is to help students and researchers learn how to process and analyze event-related potentials (ERPs). My first ERP book, An Introduction to the Event-Related Potential Technique, focused on providing a conceptual understanding of ERPs, and the present book focuses on applying those concepts to real data. Theory is important, but there is no substitute for loading up real data—with all its warts and complexities—and figuring out how to go from a gigabyte of raw EEG files to a few kilobytes of statistical analyses and figures that are ready for publication.
At its essence, this book is a set of data processing and analysis exercises that are wrapped in explanatory text. ERP analysis involves a million decisions, such as whether to filter before versus after artifact rejection and what measurement window to use for quantifying the amplitude of an ERP component. The exercises in this book are designed to give you experience making the choices that will lead to the most robust and valid conclusions. In theory, you could read the book without doing the exercises, but that would be like trying to learn painting from a textbook without ever picking up a paintbrush. So fire up Matlab and get ready to process some data!
I wanted to write this book for many years, but I waited because I needed two things: 1) Free software that anyone can use to do the exercises, and 2) a large public dataset with multiple different ERP paradigms. Both are now available. The free software consists of ERPLAB and its companion EEGLAB, and the large public dataset is the ERP CORE (Compendium of Open Resources and Experiments).
ERPLAB and EEGLAB
ERPLAB (Lopez-Calderon & Luck, 2014) is an open-source Matlab toolbox that my lab produces with support from an NIH grant. The original version of ERPLAB, now called ERPLAB Classic, is a plugin that operates within the EEGLAB package (Delorme & Makeig, 2004). ERPLAB Studio (or eStudio for short) is a standalone application that provides a more user-friendly interface to the same underlying ERPLAB and EEGLAB code. eStudio is included in the ERPLAB package, so you already have it if you've downloaded a recent version of ERPLAB.
I have some good news and some bad news: ERPLAB and EEGLAB are completely free, but Matlab is not free, and you will need it to run EEGLAB and ERPLAB. However, most institutions provide reduced-cost Matlab licenses, and the student version is even less expensive (or even free at some institutions). Matlab has become the lingua franca of cognitive neuroscience, and it’s well worth the investment.
The ERP Core
The ERP CORE is a set of six classic ERP paradigms that have been optimized to isolate seven widely studied ERP components (N170, mismatch negativity, N400, P3b, N2pc, error-related negativity, and lateralized readiness potential). Emily Kappenman and I created the ERP CORE to provide a set of “reference” data that could be used by a large set of researchers for a wide range of purposes. The public resource includes the experimental control scripts, data from 40 neurotypical young adults, and EEGLAB/ERPLAB processing scripts for every stage of processing and analysis. If you’d like to know how to obtain a robust N400, you can download our N400 experimental control script to see how it’s done. If you’d like to see how to professionally analyze the error-related negativity (ERN), you can download our ERN processing scripts. If you’ve just put together your own EEG recording system and you’d like to see if everything is working, you can run one or more of our paradigms and compare your data with our data (including quantitative metrics of data quality).
The ERP CORE is particularly useful for the present book because it provides data from many different paradigms, and yet the data are similarly formatted for each paradigm. That way you can see how to process many different types of data, but you won’t have to deal with superficial differences between data sets (e.g., differences in file naming conventions). Although you can download the ERP CORE files directly from the ERP CORE site, for the exercises in this book you should instead download the data using the links provided within each chapter, which provide a more streamlined set of files.
Read This Now or You'll Be Sorry!
The original heading for this section was “Troubleshooting,” but that sounds way too boring, and I figured many people would skip it. But don’t skip it! This is the most important section of this chapter.
Unless you already have years of experience with EEGLAB and ERPLAB, you’re bound to run into some bugs or other difficulties when you try to complete the exercises in this book. EEGLAB and ERPLAB are professional-strength software packages designed for state-of-the-art research, and the datasets used in the exercises are large and complex. As a result, you'll probably run into some problems when you run the exercises, including error messages, results that don’t match those shown in the book, etc.
When you encounter one of these problems, you’ll certainly be frustrated, and you might even be tempted to curse my ancestors. But these problems are actually an essential part of the learning process. When you’re analyzing your own data, you’ll run into many of the same problems. In fact, the problems will probably be worse with your own data, because the data used in the present exercises have been carefully chosen to avoid many common problems.
So, when you run into a problem, try to look at it as an opportunity for growth. Of course, you might let out a few expletives. And you may need to spend a minute doing deep breathing exercises before you remember that the error message on the screen is actually a gift in disguise. To reduce your blood pressure and help you learn the art of troubleshooting, we’ve provided a Troubleshooting Guide in Appendix 2. I recommend skimming the first two sections now and then returning to it later when you inevitably run into problems.
Here's a related but more positive piece of advice: Play! I learned the important of playing in science from one of my undergrad mentors, Allen Neuringer. If you simply follow the exercises in this book exactly as written, you’ll learn a lot. But if you want to really understand what you’re doing, you should spend considerable time playing around with things (e.g., the various options in the eStudio GUI). For example, there are many things that I say you shouldn’t do when analyzing ERP data, such as applying a high-pass filter to averaged ERP waveforms, but I actually recommend that you try them and see what happens. Just don't publish the results.
Expected Background Knowledge
This book assumes that you already have some very basic knowledge about ERPs. If you don’t, Appendix 1 provides a quick overview. Here are some things the book assumes you already know about:
- Generation of the EEG and ERPs from postsynaptic potentials in cortical pyramidal cells
- The 10/20 system for electrode locations
- Creating averaged ERPs from single-trial EEG epochs
- Artifact rejection and artifact correction
- ERP peaks and components
All of these issues are briefly covered in Appendix 1, and you should read about them if they are not already familiar. Or, better yet, you can take my free online course, Introduction to ERPs, which typically takes about 4 hours to complete. The first 2 “chapters” of the online course would be enough to get you started and should take you less than an hour. You could also read the chapter I wrote for the APA Handbook of Research Methods, Second Edition (Luck, 2024).
Much of the theory behind the analysis approaches described in this book is described in An Introduction to the ERP Technique, Second Edition (Luck, 2014). If you want to become an ERP researcher, you need to understand the reasons behind the processing steps, so I recommend going back and forth between that book and the present book. You’ll see lots of places in the present book where I point you to the relevant chapters in An Introduction to the ERP Technique. A third edition of An Introduction to the ERP Technique should be available in 2027, and it's even more directly linked with the present book.
You should also consult the online documentation for EEGLAB and ERPLAB if you want to understand some of the options and parameters in the software. There are millions of details about the operation of the software that aren't repeated in this book.
Scripting
ERPLAB Studio provides an easy-to-use graphical user interface (GUI) that allows you to process data by pointing and clicking. With the exception of the last chapter, all the exercises in this book use this GUI.
However, you can achieve a lot of additional power and flexibility by writing Matlab scripts, which are text files that specify each processing operation with a line of code. Scripts allow you to automate the EEG and ERP processing steps, which is a huge time-saver (especially when your mentor or a reviewer makes you reprocess all of your data). If you already know how to write Matlab scripts, then you’ll find it straightforward to write scripts with the EEGLAB and ERPLAB routines. If you don’t know Matlab but you have some significant experience in one or more other programming languages, you’ll be able to pick up Matlab pretty quickly (although it has a few quirks that you’ll need to learn).
If you don’t have much programming experience, EEGLAB and ERPLAB provide an excellent starting point for you to learn. Every operation that you perform in the eStudio GUI corresponds to a line of code, and every time you perform an EEGLAB or ERPLAB operation in eStudio, that line of code is saved to a history. You can grab these lines of code from the history, paste them into a text file, and voila! You have a script!
To get real power and flexibility, however, you also need to learn a little bit about the Matlab programming language. Chapter 11 is devoted to teaching you how to write EEGLAB/ERPLAB scripts. It’s designed for people at all levels of prior programming experience. However, it does assume that you know some basic programming concepts (e.g., variables, loops). If you want to learn scripting—which is an incredibly useful skill—I recommend taking a Matlab course and/or working through one or more Matlab books. I particularly recommend a book called Matlab for Behavioral Scientists (Rosenbaum et al., 2014) and the online Introduction to Programming with MATLAB course from Coursera.
I’ve also provided example scripts at the end of each chapter, showing you how to implement the GUI steps from that chapter in a script. I find that it’s much easier to start with an example script and modify it than it is to write a script from scratch.
But you do not need to know any scripting to use this book. It's a good thing to know eventually, but it can wait until you've mastered processing data with the GUI.
This page titled 1.1: Getting Started was last modified on Thu, 01 Oct 2026 18:52:42 GMT and is shared under a CC BY-NC 4.0 license and was authored, remixed, and/or curated by Steven J Luck directly on the LibreTexts platform.
The book could not be loaded just now.