ERPLAB Studio Panels: Compute Averaged ERPs - ucdavis/erplab GitHub Wiki

This panel allows you to create averaged ERPs from an epoched EEGset. It creates an ERPset, which is automatically loaded into the ERPsets panel in the ERP tab, and you will automatically be taken to that tab when averaging is complete.

Ordinarily, you will select Exclude epochs marked during artifact detection to exclude epochs that were marked during the Artifact Detection process. If you don’t want to exclude marked epochs, you can instead select Include All epochs. If you want to see what the artifacts look like when averaged over trials, you can select Include ONLY epochs marked with artifact detection (but the resulting ERPsets should be treated with caution).

Information about artifacts is ordinarily stored in both the EEG.EVENTLIST structure and the EEG.reject structure. The averaging routine checks to make sure that EEG.EVENTLIST and EEG.reject have the same artifact marks and will warn you if they differ. If they differ, you can synchronize the information in EEG.EVENTLIST and EEG.reject by going to the Artifact Info & Tools panel and clicking Sync artifact info in EEG and EVENTLIST.

In almost all cases, you should select the option to Exclude epochs with either “boundary” or invalid events. Click here to see more information about these events.

If multiple EEGsets are selected in the EEGsets panel, a separate ERPset will be created for each EEGset. If you would like to create a single ERPset that combines the data from multiple EEGsets (e.g., if a participant’s data are stored in a separate EEGset for each trial block), you can first concatenate the EEGsets into a single EEGset using the Append button in the EEGsets panel. Alternatively, you can create a separate ERPset for each EEGset and then combine the ERPsets using the Average Across ERPsets panel with the Use weighted average… option.

Data Quality Metrics

During the averaging process, ERPLAB can compute several measures of data quality. This is done automatically by default (although you can disable it by selecting No Data Quality measures in the Data Quality Quantification section of the averaging panel). You can also compute and view the data quality metrics without averaging using the Compute Data Quality Metrics panel (in the EEG tab). For a big-picture overview of how ERPLAB computes and stores data quality measures, see the manual page on Data Quality Metrics.

By default, ERPLAB will compute:

  • Baseline Noise - the noise level of the baseline period (the standard error across time points of the voltage during the period prior to time zero) for each waveform.

  • Point-wise SEM - the standard error of the mean across trials at each time point for each waveform.

  • aSME - the analytic standardized measurement error (aSME) of the mean amplitude for a set of default time windows.

The aSME quantifies the standard error of measurement for the mean voltage during a specific time window. You can change the time windows by selecting On- custom parameters and clicking the Set DQ options… button. The most common modification is to select one or more SME time windows that correspond to the time windows that you will use to measure the mean amplitudes of the ERP components. See the next subsection for more information about customizing the data quality measures.

We encourage you to report the SME values in publications so that readers can assess the quality of your data. You can aggregate the SME values across participants when you make a grand average. If you report the SME values in your publications, please cite Luck et al. (2021).

When averaging is complete, a table showing the lowest, highest, and median SME values will appear (from among every combination of channel, bin, and time window). The data quality information is stored in the ERPset, and you can view a table with this information by selecting an ERPset in the ERPsets panel and going to the View Data Quality Metrics panel (in the ERP tab).

Information for scripting: The data quality metrics are stored in the ERPset as ERP.dataquality. The standard error of the mean for each time point is stored in ERP.binerror.

Custom settings for data quality metrics

By default, aSME is computed in a number of 100 ms windows. If you click the Set DQ options… button, you can change these time windows, add new time windows, and delete time windows.

Compute analytic standard deviation (aSD). This option provides a measure of data quality that does not directly depend on the number of trials (whereas the SME factors in the number of trials being averaged together). The mean amplitude across a given time range is measured on each trial, and the SD of these values across trials is computed.

Compute pointwise standard error of the mean (SEM). This option controls whether the routine will compute the standard error of the mean (across all epochs, separately for each time point in each bin) along with the average. This standard error data will be saved in the ERP.binerror matrix in the ERPset. Note that the standard error may later be removed by certain processing steps (e.g., filtering, bin operations, averaging across ERPsets) because these steps render the previous standard error meaningless.

Correcting for bias. The analytic SD, SEM, and SME estimates exhibit a bias that varies with the number of trials: As the number of trials gets smaller, these estimates become progressively lower than the true value. We provide an option that corrects for this bias (Gurland & Tripathi, 1971). We recommend using this option, but it is off by default (to maintain backward compatibility with previous versions of ERPLAB that did not include this option).

⚠️ **GitHub.com Fallback** ⚠️