Skip to content

EEGLAB STUDY: run, session, condition and group

Cyril Pernet edited this page Jun 11, 2022 · 2 revisions

The simplest way to use LIMO MEEG is to use EEGLAB STUDY as in the figure below from the tutorial.

Figure 1. Wakeman_Henson STUDY Figure 1. Example of using EEGLAB STUDY

What is expected

Experimental conditions in STUDY are only used for simple designs/analysis and not used because LIMO MEEG expects a single file with all single trials precomputed (see below). Similarly, all runs must be concatenated into a single .set file per session. This means that to use LIMO 1st level, a STUDY will only contains subjects, sessions, and possibly groups (if more than one, no need to specify otherwise).

Runs and Sessions follow the BIDS and COBIDAS definitions:

  • runs: recordings with the same acquisition parameters from a given session. ALWAYS set to 1.
  • sessions: A session includes the time involved in completing all experimental tasks. This begins when a participant enters the research environment until he/she leaves it. Defining multiple sessions is appropriate when several identical or similar data acquisitions are planned and performed on all (or most) participants, often in the case of some intervention between sessions (e.g., training or therapeutics) or for longitudinal studies.
  • conditions: these are the experimental task conditions within each run. NEVER use this for LIMO 1st level analysis.
  • groups: these are the experimental participants groups, this is used by LIMO to create specific file reports per groups, to be used at the group level.

Precompute STUDY measures

LIMO MEEG models data using a hierarchical approach with a general linear model at the subject level and then testing, at the group level, parameters obtained with robust methods. You can think of it as generating averages per condition at the subject level and do statistics on those averages at the group level. The difference (and advantage) is that subject-specific baselines are removed, among trial variance accounted for, and bad subjects are accounted for. For more details see the San Diego 2016 lecture as pdf and/or on YouTube.

Precompute single-trial measure(s)

No matter the design, using LIMO MEEG means we need single trials to obtain condition related parameters for each subject. Conditions will be specified in the design (next step). For one session (all runs/conditions), EEGLAB will export all trial data measures and, depending on the design, will pass on only relevant ones to LIMO EEG (even if this is only the mean as for comparing spectra between groups).

Create ERPs and/or Spectra and/or ERSP (Study --> Precompute channel measures – figure 2). Note you could set limits to your epoch at this stage (using ‘timelim’ and ‘freqlim’) or limit the statistical analysis at the next stage (which is what we will do). For ERPs, baseline correction can be added using [-200 0]. Note that ERSP can take a long time. You can start with ERP and Spectra only (of course if you do that, you will not be able to use LIMO on ERSP in the next sections).

Figure 2. Precompute channel measures
Figure 2. Precompute channel measures

All single trials (erp, spectrum, ersp) can also be generated in command line using:

% Precompute ERP and Spectrum measures
[STUDY, EEG] = std_precomp(STUDY, EEG, {}, 'savetrials','on','interp','on','recompute','on',...
    'erp','on','erpparams', {'rmbase' [-200 0]}, 'spec','on',...
    'ersp','on','itc','on', 'specparams',{'specmode','fft','logtrials','off'});

Create your design - set experimental conditions

From a set of available conditions and trial information encoded inside .set files, many options will be available to select independent variable that be categorical or continuous. Every design can be generated from here, which is why you don't need to specifiy conditions before hand (you may want to do different grouping/design from the same data - no need to make multiple STUDY).

Note on using LIMO default and sampling rate

By default, LIMO EEG uses a Weighted least Squares approach for each trial, which means you should aim to have more trials than time frames (for ERP and ERSP) or frequency frames (for Spectrum), while not mandatory.

Clone this wiki locally