Command: PlugAggregate.
When running an experiment, usually one wants to analyze
different combinations of trial conditions. Therefore, one approach
consists in coding and averaging all conditions as many times as the
number of comparisons one wants to inspect. However, a more efficient
approach consists in coding the first time the smallest possible
conditions, and then average them together to examine specific
combinations.
For instance, if one has a Latin square design
comparing red and green squares and circles,
Shape
Circle Square
------------------------------
Red | 1 | 2
Color -----------------
Green | 3 | 4
------------------------------
then one has a total of four conditions (which will be named .at1,
.at2, .at3 and .at4). In order to compare circles (both green and
red) to squares (both green and red), one should combine condition 1
with condition 3, and condition 2 with condition 4. Emegs allows to
do this either by using command-line programs, or using the
PlugAggregate plugin.
As all Emegs plugins, it can be called either
as a standalone program by calling PlugAggregate from the Matlab
command line, or using the Aggregate files entry in the Plugin menu.
The PlugAggregate window contains buttons to load an .agg file, run the analysis and close the window.
The PlugAggregate window contains options to recursively operate on data structured with one directory per subject, to delete old aggregate files, and to create grandaverages (across subjects).
What PlugAggregate needs to operate is an .agg file which specifies the way conditions will be combined, the name the averages will have, and contains comments e.g. on the condition names. To combine red with green circles and squares, one should use the following .agg file:
%
% Circles and Squares.agg
% by Andrea De Cesarei
% condition 1: circles
% condition 2: squares
CircSquaresAgg
1 3
2 4
The file contains:
some comment lines, which must be at least one and start with %;
a prefix which will be given to the output file
as many lines as the resulting conditions, each one containing the conditions which will be merged together IMPORTANT: every line must contain the same number of codes, if you have unequal number of conditions you can fill the line with zeros
To use the aggregate file, click on LoadConditions, and check that
the file is loaded correctly.
Then, choose whether the program
will work recursively (e.g. different directory for each subject) or
just in the specified directory. Choose also if you want to keep or
delete old averages, and if the program should create grandaverages
(tested only in recursive mode). When all is set, push Run Aggregate
and create a dummy file in the top(or target) directory.
The program will create two files, named CircSquaresAgg.at1.gm.a which will contain the average of conditions 1 and 3, and the file CircSquaresAgg.at2.gm.a containing the average of conditions 2 and 4.
Optionally, the top folder will also contain files called
GrandMeanCircSquaresAgg.at1.gm.all.at.a which contain the grandaverage
across subjects of the specified conditions.