On MS Windows, ANSLAB also offers integration with "R", a powerful
open-source calculation platform, that offers more advanced statistics,
like MANOVA and Mixed-Effect-Models. You can run these analysis types
directly on your psychophysiological data, using an intermediate
communication tool (R(D)COM-server). With the help of this server,
ANSLAB sends the data to R, has R do the test, and returns the
statistical parameters. To run statistical test in this way, "R" and
"R(D)COM-server" must be installed on your system. Both
can be downloaded at
http://www.r-project.org/.
Running an
analysis using R then differs from the matlab-based procedure
exclusively in
the start command: instead of usign the Run M-ANOVA-command from ANSLAB
calculate-menu, choose Run R-ANOVA,
Run
R-LME/NLME or Run R-MANOVA.
All other steps, including the definition of
the
factorial design, loading of required batchfiles and menu settings are
identical to the procedure described below.
To run a repeated measures ANOVA, prepare your data as described:
Each condition for every subject has to be saved as
an ans average file. Every file has to have the same number of points
and
number of channels and the same baseline calculation. You need a
textfile, listing the paths of those files on your
machine (a 'batchfile'), with one path per line.This batchfile has
to reflect the design of the planned
analysis, that is, your paths have to be listed according to the
hierarchy of your factors. The lowest level is always the
subject
factor, so you 'll start with one cell for which all subjects average
files are given.
Beneath that, you list all subjects average files for the next cell
etc. The subject order has to be identical in every cell, and you have
to have equal number of subjects in every cell. Please note that the
structure of the batchfile is identical, wether or not you have
defined one or more between factor(s)!!!!!
Unequal cell sizes (between) or missing data (within) are
not yet supported. Cells are ordered from lowest hierarchy position of
the factor to highest hierarchy position. For instance, consider a
2X2X2 design with the factors 'task'
(count forward vs count backward), 'color' (count red squares
vs. count green squares) and 'gender'. Your batchfile for 16 subjects
has to have
the following form:
The design string would be
the following: nrofsubjects: 16; nrofintervalls: 1; task:2;countforward,countbackward; color:2;countredsquares,countgreensquares; between gender:2;male,female; [0,1,0,1,0,0,1,1,1,1,0,0,1,1,0,0]; |
Once you've prepared this, load one of the listed files in ANSLAB,
set the baseline and display all points. Load the batchfile as
filematrix (File\filematrix\LoadBatchfile).
Then choose \Calculate\Repeated Measures Anova\define, and enter your
design. You always have
to enter the
following 2 parts: number of subjects in your sample
(ignoring betweenfactors, that is the total
number subjects in all groups) and the number
of intervalls using the following syntax:
All other within factor definitions are optional and have to comply
with the
following syntax:
Between/group factor definitions have the following syntax:
As you can see, one difference to the within factors is the subject
vector, which specifies the group affiliation of each subject ( in
text-mode, this vector forms a new
line right after the factor declaration ). You can supply any integer
numbers as group indices, but no strings. These numbers are mapped to
the cell names according to their value: the lowest number will be
the first group, the next higher number the second group etc. .
Subject vectors have to have one element for each subject, but subjects
do not have to be grouped according to their group membership (a vector
like [0 0 1 1] is equivalent
to [0 1 0 1] if your batchfile is ordered accordingly. The second
difference to a within factor definition is the mandatory keyword
'between' before the actual factor definition.
If you whish to calculate the design for all
points and and view the output as ANS average files,
set nrofintervalls to the total number of points
in your data files. Please note, that with a high number of timepoints,
this analysis can exceed the available RAM of your computer. To
effectively
avoid the crash, you can reduce the spatial and temporal resolution by
using
'Intervall means'.
If you want to run one special analysis for
certain time points, enter the number
of time intervalls correspondingly. These values have to match the
defined segments in ANSLAB (created by mouseclicks, loaded from file,
or using the segment-wizard). If more than one interval is
provided, time
will be a separat factor in the ANOVA. Please not that for a true
pointwise
analysis, the whole intervall has to be selected in ANSLAB including
baseline points!!!
If you want to use intervalls but still want the output
as continuous ANS-files, add the line 'continuous results;' at
the end of the design text. The result files will
be stepfunctions of time: all timepoints in a defined intervall will
have the same value. The automatic creation usually is much easier and
sufficient in the case, that you only wish to use
intervalls/channelgroups to reduce memory load.
Click 'OK' and choose \Calculate\Repeated Measures Anova\Run Anova or
click the 'OK & Run'-button. For a pointwise/continuous analysis, you will be
prompted for a target folder, where results are going to be saved. ANSLAB will
save one average file in ANS format for every factor and interaction in
your ANOVA, containing F- and it's corresponding P-values. For a single
analysis, results will be
displayed in a text box in the dialog section, from where you can
display means graphically using the 'anova'-tab in the dynamic section
of ANSLAB command window.
Moreover, ANSLAB will create a PowerPoint report with data- and
statistics-screenshots for every factor and interaction after running
the analysis. This requires obviously, that microsoft PowerPoint is
installed on your computer.