Averaging Across ERPSETS _ Creating Grand Averages - ucdavis/erplab GitHub Wiki

Averaging Across ERPsets (Creating Grand Averages)

The ERPLAB > Average Across ERPsets routine is used to average together the data from multiple ERPsets. That is, each bin from one ERPset is averaged with the corresponding bin from one or more other ERPsets. The most common use for this is to create a grand average across subjects. It can also be used if the EEG data for a given subject were divided among different EEG files (e.g., because they were collected in different sessions) and then averaged separately into separate ERPsets. This routine can be used only if all of the ERPsets being averaged together contain the same number of bins, channels, and sample points.

The GUI is shown in the screen shot below. You can either specify a set of ERPsets that have already been loaded into ERPLAB and are listed in the ERPsets menu or a set of ERPsets stored in files on disk. You can save the set of filenames in a list with the Save List option, and you can load in a set of filenames with the Load List option.

Ordinarily, each ERPset being averaged together receives equally weighting in the average that is created by this routine. That is, the ERP waveforms in the separate ERPsets are simply summed together and then divided by the number of ERPsets. However, there is an option for averaging in a manner that is weighted by the number of trials that contributed to each average (a "weighted average"). Imagine, for example, that you were averaging together two sessions from a given subject, with each session stored in a separate ERPset, and bin 1 contained 10 trials in the first session and 90 trials in the second session. If you enable weighted averaging, the average of bin 1 would be calculated as 10 times the waveform from session one plus 90 times the waveform from session two, and then divided by the total number of trials (10+90). This gives each trial equal weight in the final average.

GUI

If one of the bins in one of the ERPsets did not actually have any trials (e.g., due to artifacts), this bin will have no weight and will not impact the grand average if you are computing weighted averages. However, this can really mess up the default unweighted averaging procedure, because that bin will be flatlined for that ERPset. These "null bins" can be automatically excluded if you select the option labeled Excludes any null bin from non-weighted averaging. Keep in mind, however, that the presence of a null bin often means that there is a problem somewhere in your data analysis pipeline that needs to be fixed. For example, conventional statistics cannot be used if you have no data in one condition in one of your subjects. Also, using this option will mean that different subjects contribute to the different bins in the grand average. Thus, you should use this option carefully.

There is also an option for calculating the standard error of the mean across the ERPsets. This is simply the standard error across the different ERPsets, calculated separately for each time point in each bin. This completely ignores the standard error information that was created at the time of averaging.

Finally, there is an option for having the routine warn you about subjects who have an excessive number of rejected trials. For example, you might want to exclude any subjects for whom over 25% of trials were rejected (see the chapter on artifact rejection in Luck, S.J., An Introduction to the Event-Related Potential Technique). This option provides a convenient way of checking this (but it does not automatically exclude the subjects).