Simply EEGLAB

Precomputing measures

Station 8 · Lesson 5 · EEGLAB 2026.1

In the GUI

  1. StudyPrecompute channel measuresPre-compute channel measures for STUDY 'Go-nogo animal (mine)'
  2. Spherical interpolation of missing channels (performed after optional ICA removal below)
  3. Remove ICA artifactual components pre-tagged in each dataset
  4. Remove artifactual ICA cluster or clusters (hold shift key)
  5. ERPs...Select parameters for ERP
  6. Baseline (min max) ("rmbase")Epoch start (sec)Ok -1000 0
  7. Power spectrum 'specmode', 'fft', 'logtrials', 'off'
  8. ERSPsITCs
  9. Overwrite files on diskYes WARNING: SOME DATAFILES ALREADY EXIST, OVERWRITE THEM?animal.studyanimal_mine.study
  10. Ok

Script

baseline = [round(ALLEEG(1).xmin*1000) 0];   % from the epoch start to 0 ms
[STUDY, ALLEEG] = std_precomp(STUDY, ALLEEG, {}, 'savetrials', 'on', 'interp', 'on', 'recompute', 'on', ...
    'erp', 'on', 'erpparams', {'rmbase', baseline}, ...
    'spec', 'on', 'specparams', {'specmode', 'fft', 'logtrials', 'off'}, ...
    'ersp', 'on', 'itc', 'on', 'erspparams', {'cycles', [3 0.8], 'freqs', [3 30], 'nfreqs', 20, 'ntimesout', 50});
STUDY = pop_savestudy(STUDY, ALLEEG, 'savemode', 'resave');
first = STUDY.datasetinfo(1);
measureFiles = dir(fullfile(first.filepath, [first.subject '.dat*']));
for k = 1:numel(measureFiles)
    fprintf('%-24s %8.1f MB\n', measureFiles(k).name, measureFiles(k).bytes/1e6);
end
fprintf('Channel groups in the STUDY: %d\n', numel(STUDY.changrp));

Which value should I choose?

OptionIn this lessonGeneral rule
Baseline (rmbase)From the epoch start to 0 msThe same baseline you used for each participant. If the data are already corrected, a second correction does no harm.
Interpolation (interp)on, as in the windowIn the script its default is off, so write it out. It is better to interpolate missing channels in each participant's file before the STUDY, where you can see them.
ICA removal (rmicacomps)offon only if components are flagged in every file and were not removed from the data before.
Spectrum (specparams)'specmode', 'fft', 'logtrials', 'off'The default suits a first analysis. Change it only for a methodological reason.
ERSP (erspparams)Every channel, 20 frequencies from 3 to 30 Hz, 50 time pointsA finer grid only for the frequencies and times in your research question. Keep every channel in EEGLAB 2026.1.
Save trials (savetrials)onFixed: current EEGLAB has no other choice, and the window always adds it.
Recompute (recompute)onon whenever you change any option, otherwise EEGLAB reads the old files.

For your Methods

Channel ERPs and spectra were precomputed for each participant and condition (std_precomp), with baseline correction from [−1000] to 0 ms; with spherical interpolation of any missing channels enabled; event-related spectral perturbations were computed at every channel for [20] frequencies from [3] to [30] Hz.

Full lesson: https://simplyeeglab.pages.dev/en/lesson/study-precompute/

Content license: CC BY-NC-SA 4.0 · MIT (code)

An independent learning site, not affiliated with EEGLAB or SCCN.