-
Notifications
You must be signed in to change notification settings - Fork 73
Computing Averaged ERPs
Computing averaged ERPs from an epoched dataset is quite simple. There is only one slight complication, which is that it is possible to average across multiple sets of EEG data at one time. Imagine, for example, that you recorded half of the data for a given subject on one day and the other half on a different day, resulting in two separate EEG files (stored in separate datasets). Or imagine that you have 6 conditions, and each was recorded in a separate file. You could average each of the datasets separately and then combine the averages using ERPLAB > Average Across ERPsets. However, ERPLAB makes it possible to combine them during the averaging process, which is usually easier. This is accomplished by simply specifying multiple datasets when you average. All the datasets are then treated as if they are one big dataset (this is sometimes called "weighted averaging", because each trial is weighted equally).
To compute averaged ERPs, you must first load one or more epoched datasets in EEGLAB. You can then select ERPLAB > Compute Averaged ERPs. In the window that appears, enter the # of the dataset that contains the data you would like to average (or multiple datasets). For example, if you want to average the epochs in dataset #2, you would simply type '2' into the window. If you wanted to average the epochs in datasets 2, 3, and 5, you would type '2 3 5' into the window. Or, if the datasets are consecutive, you could type something like '1:3' into the window (as in the screenshot below). The current dataset is the default. If you aren't sure what the number of your dataset is, just look in the Datasets menu. Click RUN to compute the averaged ERPs.
You will ordinarily want to exclude all epochs that have been marked as containing artifacts. It is also possible to ignore the artifact marks by selecting Include ALL epochs. You can even include only the epochs with artifacts (by selecting Include ONLY epochs marked with artifact rejection), which could be helpful in seeing exactly how the artifacts are distorting the data.
Important note: Although ERPLAB keeps track of artifacts using the artifact flags in the EEG.EVENTLIST structure, EEGLAB instead uses the EEG.reject structure. When ERPLAB detects an artifact, it updates both EEG.EVENTLIST and EEG.reject. When EEGLAB's artifact detection routines are used, only EEG.reject is updated. Consequently, ERPLAB checks to make sure that EEG.EVENTLIST and EEG.reject have the same artifact marks, producing a warning message if they differ. If they differ, you can synchronize the information in EEG.EVENTLIST and EEG.reject with the ERPLAB > Artifact Detection > Synchronize Artifact Info in EEG and EVENTLIST command.
You can also choose to compute the standard error of the mean (across all epochs, separately for each time point in each bin) along with the average. Note that the standard error is removed by certain other processing steps (e.g., filtering, bin operations, averaging across ERPsets) because these steps render the previous standard error meaningless.
When the averaged ERPs have been computed, a window will appear allowing you to name and save the ERPset containing the new ERP structure (see screenshot below). This same window appears whenever you create a new ERPset. Here's how it works:
- You can choose to either overwrite the current ERPset or create a new ERPset. ERPsets don't usually take up much RAM, so you will almost always want to create a new ERPset.
- You need to choose a name for the ERPset. This will be the name shown in the ERPsets menu.
- You can optionally save the ERPset as a file. If you click the same as erpname button, it will give the file the same name as the ERPset (recommended in most cases), but with a .erp extension. By default, it will be saved in the current folder. However, you can use the Browse button to browse through your file system to find a place for it (or you can include the path explicitly along with the filename).
Note: The averaging routine can average together multiple datasets, which is very useful when a single subject's data are divided into different datasets. In principle, this routine can also average together the data from different subjects. However, we recommend against this. Instead, the data from each subject should be averaged individually, and then the ERPLAB > Average Across ERPsets should be used to average together these averages.