Mass Univariate ERP Toolbox: Difference between revisions

From OpenWetWare
Jump to navigationJump to search
Line 59: Line 59:


==Getting Started==
==Getting Started==
Generally speaking, to use the toolbox, you will need to do the following:<br>
Generally speaking, to use the toolbox, you will need to one of the following:<br>
===Method A (just EEGLAB required)===
&nbsp; 1. Install [http://sccn.ucsd.edu/eeglab/ 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 a each subject. <br>
&nbsp; 1. Install [http://sccn.ucsd.edu/eeglab/ 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 a each subject. <br>
&nbsp; 2. Preprocess the single trial EEG data of each experimental subject you wish to include in your mass uni analysis as follows:<br>
&nbsp; 2. Preprocess the single trial EEG data of each experimental subject you wish to include in your mass univariate analysis as follows:<br>
&nbsp; &nbsp; 2.1 Convert your subject’s single-trial EEG data to epochs in the set file format using using EEGLAB’s data import utilities.<br>
&nbsp; &nbsp; 2.1 Convert your subject’s continuous EEG data to epochs in the set file format using using EEGLAB’s data import utilities.<br>
&nbsp; &nbsp; 2.2 Augment the default EEGLAB set file data structure with additional information about the experimental condition(s) = “bins”  that each single trial epoch belongs to using the mass uni toolbox function: bin_info2EEG.m<br>
&nbsp; &nbsp; 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<br>
&nbsp; 3. Load the augmented individual subject set files into a single MATLAB data structure: GND for within-subjects analysis, GRP for between-subjects analysis. <br>
&nbsp; 3. Load the *.erp files into a single "GND"  MATLAB data structure using the Mass Univariate Toolbox function erplab2GND.m.<br>
&nbsp; 4. Conduct the mass univariate analyses on the GND or GRP data structures. <br>
&nbsp; 4. If you want to perform between-subject analyses, create a "GRP" MATLAB data structure from two or more "GND" data structures.<br>
&nbsp; 5. Conduct the mass univariate analyses on the GND or GRP data structures. <br>
<br>
<br>
Click on the [http://openwetware.org/wiki/Mass_Univariate_ERP_Toolbox:_Tutorial tutorial] for detailed examples of how to use the toolbox.<br>
===Method B (EEGLAB & ERPLAB required)===
&nbsp; 1. Install [http://sccn.ucsd.edu/eeglab/ EEGLAB] and  [http://erpinfo.org/erplab ERPLAB] and familiarize yourself with their operation.<br>
&nbsp; 2. Preprocess the single trial EEG data of each experimental subject you wish to include in your mass univariate analysis as follows:<br>
&nbsp; &nbsp; 2.1 Classify experimental events of interest as belonging to "bins" with ERPLAB's [http://erpinfo.org/erplab/erplab-documentation/erplab-manual/Eventlist_Structure.htm "BINLISTER" routine].<br>
&nbsp; &nbsp; 2.2  If you have not already done so, convert your subject’s continuous EEG data to epochs using ERPLAB's [http://erpinfo.org/erplab/erplab-documentation/erplab-manual/Epoching_Bins.htm "Extract Bin-Based Epochs"] menu option.<br>
&nbsp; &nbsp; 2.3 Compute ERPs from each subject using ERPLAB's [http://erpinfo.org/erplab/erplab-documentation/erplab-manual/Averaging_ERPs.htm "Compute Averaged ERPs"] menu option and store the resulting "ERPset" in an ERPLAB *.erp file.<br>
&nbsp; 3. Load the *.erp files into a single "GND"  MATLAB data structure using the Mass Univariate Toolbox function erplab2GND.m.<br>
&nbsp; 4. If you want to perform between-subject analyses, create a "GRP" MATLAB data structure from two or more "GND" data structures.<br>
&nbsp; 5. Conduct the mass univariate analyses on the GND or GRP data structures. <br>
<br>
Click on the [http://openwetware.org/wiki/Mass_Univariate_ERP_Toolbox:_Tutorial TUTORIAL] for detailed examples of how to use the toolbox.<br>
<br>
<br>
<span style="color:red;">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.</span>
<span style="color:red;">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.</span>
<br><br>
<br><br>
==Acknowledgments==
==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.
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.

Revision as of 07:38, 15 November 2010


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 neuroimaging community but has not been commonly used by ERP researchers.

The advantages of mass univariate analyses include:

  1. They reduce the need for a priori defined time windows/regions of interest
  2. They can reveal unexpected effects even when a priori time windows/regions of interest are available
  3. 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:

  1. Some loss of statistical power due to correction for multiple comparisons (though less power loss than Bonferroni correction)
  2. 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 and control of the family-wise error rate via permutation tests. 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. (in prep) Mass Univariate Analysis of Event-Related Brain Potentials.

(it should be submitted soon!)

Note, the toolbox is currently in its "beta" version. It has been tested extensively in our lab and tried on data from a couple other labs. However, we suspect there may be some remaining glitches in the code due to lab idiosyncrasies. Please contact us if you discover any problems and we will attend to them as soon as possible. We are particularly grateful for feedback at this stage in the toolbox's development.

Toolbox Requirements

To use the toolbox you'll need the following:

  1. MATLAB
  2. EEGLAB, a freely available set of MATLAB tools for EEG analysis
  3. The MATLAB statistics toolbox


The Mass Univariate ERP Toolbox should work when running MATLAB on Linux or OS X. However, there may be some issues with writing or reading files when running MATLAB on Windows. Specifically, the following functions rely on the MATLAB function unix.m and probably won't work on Windows:

  • sets2GND.m
  • save_erps.m
  • headinfo.m
  • GNDs2GRP.m
  • get_set_infiles.m


The remainder of the toolbox functions (e.g., the ones that actually perform the analyses and visualization) should still work fine. We hope to make all functions Windows compatible in the near future.

Also note, the screen shots on the 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":



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 a 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.

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.