eelbrain.pipeline.GroupVar

class eelbrain.pipeline.GroupVar(groups, task=None)

Group membership for each subject

Parameters:
  • groups (Sequence[str] | dict[str, str]) – Groups to label. A sequence of group names to label each subject with the group it belongs to (subjects can’t be members of more than one group). Alternatively, a {group: label} dictionary can be used to assign a different label based on group membership.

  • task (str) – Only apply the variable to events from this task.

Examples

Assuming an experiment that defines two groups, 'patient' and 'control', these groups could be labeled with:

GroupVar(['patient', 'control'])