# Mass Univariate ERP Toolbox

### From OpenWetWare

** Home/Download **

**Tutorial**

**Revision History**

**Contact/Questions**

**Appendix**

**Other EEG Analysis Software Packages**

## Contents |

## What is the Mass Univariate ERP Toolbox?

The Mass Univariate ERP Toolbox is a freely available set of MATLAB functions for performing mass univariate analyses of event-related brain potentials (ERPs), a noninvasive measure of neural activity popular in cognitive neuroscience. A mass univariate analysis is the analysis of a massive number of simultaneously measured dependent variables via the performance of univariate hypothesis tests (e.g., t-tests). Savvy corrections for multiple comparisons are applied to make spurious findings unlikely while still retaining a useful degree of statistical power. This approach is popular in the fMRI community but has not been commonly used by ERP researchers.

The advantages of mass univariate analyses include:

- They reduce the need for a priori defined time windows/regions of interest
- They can reveal unexpected effects even when a priori time windows/regions of interest are available
- They take full advantage of the spatial and temporal resolution of EEG and are good for providing lower bounds on the temporal onsets of effects (e.g., the earliest time point at which some variable or manipulation affects stimulus processing)

The disadvantages of mass univariate analyses include:

- Some loss of statistical power due to correction for multiple comparisons (though much less power loss than Bonferroni correction)
- Some popular corrections for multiple comparisons are not guaranteed to work and may not provide the degree of certainty provided by selective analyses of a priori time windows/regions of interest

Currently the toolbox supports within and between-subject t-tests with false discovery rate controls, control of the family-wise error rate (FWER) via tmax permutation tests, and cluster based permutation test weak control of the FWER. This toolbox was produced by members of the Kutaslab of the Department of Cognitive Science at the University of California, San Diego. **If you use the toolbox to perform analyses or to produce figures used in a publication, please cite the following article:**

Groppe, D.M., Urbach, T.P., Kutas, M. (2011) Mass univariate analysis of event-related brain potentials/fields I: A critical tutorial review. * Psychophysiology.* 48(12) pp. 1711-1725, DOI: 10.1111/j.1469-8986.2011.01273.x

The more citations the article gets, the more resources we will be able to dedicate to further developing the toolbox and tutorial materials.

The toolbox tutorial in this wiki provides a little bit of background and advice on using these methods. For much more detail, see the above review article (click on the link for a pre-publication copy or here for the published version). In addition, you can watch this short talk by David Groppe that covers most of the multiple comparison correction methods used by the toolbox (the only method it doesn't cover is cluster-based permutation tests). Note that our review article covers a method by Korn et al. for control for the generalized family-wise error rate. This is not fully implemented as part of the toolbox, but the function *korn_fd1.m* will compute this procedure for one sample/repeated measures analyses if you need it.

Note, the toolbox has been tested extensively in our lab and tried on data from several other labs at this point. However, it is always possible that there are some remaining glitches in the code. Please contact us or post to the users group if you discover any problems and we will attend to them as soon as possible. We are always grateful for feedback.

## Toolbox Requirements

To use the toolbox you'll need the following:

- MATLAB
- EEGLAB, a freely available set of MATLAB tools for EEG analysis
- The MATLAB statistics toolbox

The Mass Univariate ERP Toolbox was originally designed to be used with MATLAB running on Linux or OS X. It should now work when running MATLAB on Windows as well. Also note, the screen shots on this wiki were made from MATLAB on OS X. The GUIs may look somewhat different when produced by MATLAB on Linux or Windows.

## How do I Download the Toolbox?

You can download the toolbox and sign up for toolbox updates from here: Download Toolbox

To sign up for toolbox updates, you will need to register for a free Mathworks account, go to the toolbox download page, and click "Watch this File":

Alternatively, you can subscribe to the users group to receive an email when the toolbox is updated.

Once you've downloaded the toolbox, you "install it" by simply adding the directory to your set of MATLAB paths. The first section of the toolbox tutorial shows you how to do this.

## Getting Started

Generally speaking, to use the toolbox, you will need to one of the following:

### Method A (just EEGLAB required)

1. Install EEGLAB and familiarize yourself with its operation, particularly the EEGLAB set file data structure for working with fixed-length single trial EEG data (epochs) recorded from each subject.

2. Preprocess the single trial EEG data of each experimental subject you wish to include in your mass univariate analysis as follows:

2.1 Convert your subject’s continuous EEG data to epochs in the set file format using using EEGLAB’s data import utilities.

2.2 Augment the default EEGLAB set file data structure with additional information about the experimental condition(s), called “bins”, that each single trial epoch belongs to using the Mass Univariate Toolbox function: bin_info2EEG.m

3. Load the *.erp files into a single "GND" MATLAB data structure using the Mass Univariate Toolbox function erplab2GND.m.

4. If you want to perform between-subject analyses, create a "GRP" MATLAB data structure from two or more "GND" data structures.

5. Conduct the mass univariate analyses on the GND or GRP data structures.

### Method B (EEGLAB & ERPLAB required)

1. Install EEGLAB and ERPLAB and familiarize yourself with their operation.

2. Preprocess the single trial EEG data of each experimental subject you wish to include in your mass univariate analysis as follows:

2.1 Classify experimental events of interest as belonging to "bins" with ERPLAB's "BINLISTER" routine.

2.2 If you have not already done so, convert your subject’s continuous EEG data to epochs using ERPLAB's "Extract Bin-Based Epochs" menu option.

2.3 Compute ERPs from each subject using ERPLAB's "Compute Averaged ERPs" menu option and store the resulting "ERPset" in an ERPLAB *.erp file.

3. Load the *.erp files into a single "GND" MATLAB data structure using the Mass Univariate Toolbox function erplab2GND.m.

4. If you want to perform between-subject analyses, create a "GRP" MATLAB data structure from two or more "GND" data structures.

5. Conduct the mass univariate analyses on the GND or GRP data structures.

Click on the TUTORIAL for detailed examples of how to use the toolbox.

Note, to print (or make a pdf of) any pages of this wiki, click the "Printable version" link on the left hand column of each page before printing.

## Users Group

In early 2015, we created a "Mass Univariate ERP Toolbox Google Group" where you can post questions, bug reports, or other information that be useful to other toolbox users. If you subscribe to the group's emails you will also be notified of toolbox updates.

## Acknowledgments

Production of the toolbox and documentation were supported by US National Institute of Child Health and Human Development grant HD22614 and National Institute of Aging grant AG08313 to Professor Marta Kutas.

Thanks to Katherine DeLong for help designing and debugging the toolbox. Thanks also to Steve Luck, Javier Lopez, and Johanna Kreither for helping to ensure that the toolbox is compatible with ERPLAB. Finally, big thanks to the following individuals who have contributed to the toolbox by fixing bugs in the code (that they identified):

- Gábor Háden

- Amy Guthormsen

- Haibo Zhou

- Elisa Filevich

- Udo Will

- Aaron Newman