Simply EEGLAB

STUDY designs and variables

Station 8 · Lesson 4 · EEGLAB 2026.1

In the GUI

  1. StudySelect/Edit study design(s)Edit STUDY design -- pop_studydesign()
  2. Design name STUDY.design 1
  3. Edit the independent variables for this design Categorical variable: condition - Values (animal - distractor)Categorical variable: group - Values (F - M)
  4. New Design 2
  5. RenameStudy design name:Ok image x gender
  6. NewAdd variable
  7. Select independent variableSelect variable valuesOk conditionanimaldistractor
  8. NewOk groupFM
  9. NewRename image only
  10. Design nameOk image x gender
  11. Re-save STUDY file (if saved previously) animal_mine.study
  12. Ok Selecting STUDY design 2Resaving STUDY

Script

STUDY = std_makedesign(STUDY, ALLEEG, 2, 'name', 'image x gender', ...
    'variable1', 'condition', 'values1', {'animal', 'distractor'}, 'vartype1', 'categorical', ...
    'variable2', 'group', 'values2', {'F', 'M'}, 'vartype2', 'categorical');
STUDY = std_makedesign(STUDY, ALLEEG, 3, 'name', 'image only', ...
    'variable1', 'condition', 'values1', {'animal', 'distractor'}, 'vartype1', 'categorical', ...
    'variable2', 'none');
STUDY = std_selectdesign(STUDY, ALLEEG, 2);
STUDY = pop_savestudy(STUDY, ALLEEG, 'savemode', 'resave');
for k = 1:numel(STUDY.design)
    d = STUDY.design(k);
    fprintf('Design %d: %s\n', k, d.name);
    for v = 1:numel(d.variable)
        if ~isempty(d.variable(v).label)
            fprintf('   %-10s paired: %-4s values: %s\n', d.variable(v).label, ...
                d.variable(v).pairing, strjoin(d.variable(v).value, ' '));
        end
    end
end
fprintf('Current design: %d\n', STUDY.currentdesign);
eeglab redraw;

Which value should I choose?

Within subjectsBetween subjects
MeaningEach participant has every valueEach participant has one value
In D6Picture type: animal and distractorGender: F and M
Usually stored inconditiongroup
Testpaired: compares each participant with themselves, removing differences between peopleunpaired: compares two groups of different people
Statistical powerHigher for the same numberLower, and needs more participants
Your questionDesignWhy
Does the ERP differ between animal pictures and the others?3, image onlyA direct paired test on 14 participants, and a plot with two curves instead of four. The 2×2 design also computes the main effect of picture, but it is harder to read.
Does the picture effect differ between women and men?2, image x genderThe interaction between the two variables needs both in one design.
Does the ERP differ between women and men?A design with group onlyunpaired, 7 against 7.

For your Methods

A 2 × 2 mixed design was defined in the STUDY, with image category (animal, distractor) as a within-subject factor and gender ([7] female, [7] male) as a between-subject factor (std_makedesign, EEGLAB 2026.1).

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

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

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