Specifying Within-Subjects (Repeated Measures) Univariate and Multivariate Designs - Multi-Way Within-Subjects ANOVA

Summary
In experimental designs, it is not uncommon to include more than one repeated measures factor. For example, in a memory experiment you may compare subjects' recall of words that were presented at the beginning of a list of words, in the middle of the list, and at the end of the list (first repeated measures factor with three levels); in addition, the words either contained four letters or five letters (second repeated measures factor with two levels); finally, the words were either meaningful words in the English language, or were not meaningful (third repeated measures factor with two levels). The resultant design is a 3 (position of words) by 2 (length of words) by 2 (meaningful vs. nonsense words) ANOVA design where all factors are repeated measures factors.
Note: multi-factor repeated measures designs must be analyzed via the General Linear Models (GLM) module (the ANOVA/MANOVA module only supports one-way repeated measures designs).
Setting up the datafile
Let us assume that the data were entered into a file as follows:
Rep. measures factor: Level:
1 (Position) 1 2 3
2 (Length) 1 2 1 2 1 2
3 (Meaning) 1 2 1 2 1 2 1 2 1 2 1 2
Subject 1 9 4 3 4 3 4 5 4 3 4 5 4
Subject 2 7 4 3 4 6 4 3 7 6 5 4 3
Subject 3 6 5 7 8 7 6 8 5 6 4 5 2
- - - - - - - - - - - - -
- - - - - - - - - - - - -
- - - - - - - - - - - - -

The first variable in the data file contains the data for the first level of all repeated measures factors. The second variable contains the data for the second level of the third repeated measures factor, and the first levels of the first and second repeated measures factors, and so on.

Specifying the design
In order to specify the design for the example data, select Repeated measures ANOVA as the Type of Analysis and Quick specs dialog as the Specification method on the GLM Startup Panel Quick tab. Then click the OK button on the GLM (Startup Panel). Next, click the Variables button on the GLM Quick Specs dialog and select all variables in the dependent variable list, in exactly the same order in which the variables appear in the file (in this example the variables do not have to be reordered); i.e., enter 1-12 into the Dependent variable list field. Then click the Within effects button to display the Specify Within-Subjects Factors dialog and specify the repeated measures (within SS) design. First specify the factor Position with 3 levels, then specify the factor Length with 2 levels, and finally specify the factor Meaning with 2 levels.

In general, STATISTICA assigns variables to levels of the repeated measures factors in the following manner: STATISTICA "cycles" through the list of dependent variables and assigns the variables to consecutive levels of the repeated measures factors. In this procedure, the fastest "moving" (changing) levels are those of the repeated measures factor that was specified last; the next-fastest moving (changing) levels are those of the factor that was specified next to the last, and so on. When STATISTICA cycles through the list of dependent variables, the assignment of variables to levels is determined by the order in which dependent variables appear in the list of dependent variables (not by the order in which variables appear in the file). For example, if a 2 x 2 x 3 repeated measures ANOVA is specified, STATISTICA assigns consecutive variables from the dependent variable list to levels of repeated measures factors in the following manner:

Rep. measures factor: Level:
1st Factor 1 2
2nd Factor 1 2 1 2
3rd Factor 1 2 3 1 2 3 1 2 3 1 2 3
Position in dependent var. list 1 2 3 4 5 6 7 8 9 10 11 12
Note: the last row of numbers refers to the position of the respective dependent variable in the list of dependent variables (not the position of the variable in the file). Thus, when specifying complex multi-way within-subjects designs, there are two things that determine how variables are assigned to levels of the repeated measures factors: (1) the order in which repeated measures factors are specified, and (2) the order in which dependent variables are specified in the dependent variable list.
Examining specific effects
You have the choice of computing the multivariate or univariate test (or both) when evaluating effects that involve repeated measures factors with more than two levels (use the Analysis/Graph Output Manager dialog to determine the detail of reported results).
Testing planned comparisons
Planned comparisons can be performed in exactly the same manner as in between-groups designs, that is, STATISTICA expects you to enter a set of contrast coefficients (using the Contrasts for LS Means button on the GLM Results - Comps tab). It is usually easier to enter these contrasts separately for each factor rather than together for all effects. In general, the same rules introduced for the one-way repeated measures ANOVA apply when specifying contrasts for multi-way repeated measures designs. However, in addition it is admissible (and often necessary) to enter contrast coefficients for a factor that do not sum to zero (0). Referring back to the example of a 3 x 2 x 2 repeated measures design, if you wanted to evaluate the interaction of the second and third factor, but only for the first level of the first factor, the following coefficients would be entered:
Factor 1 (Position) 1 0 0
Factor 2 (Length) 1 -1  
Factor 3 (Meaning) 1 -1  

In this case, the second and third level of the first repeated measures factor will be ignored, and the interaction between factors 2 and 3 will be evaluated only within level 1 of the first repeated measures factor. If you wanted to evaluate the main effect for Meaning (third factor) within the first level of the first repeated measures factor, the following set of coefficients should be entered:

Factor 1 (Position) 1 0 0
Factor 2 (Length) 1 1  
Factor 3 (Meaning) 1 -1  

Again, the second and third level of the first repeated measures factor will be ignored. Both the first and second level of the second repeated measures factor will be "weighted" equally, i.e., not contrasted against each other, while the two levels of the third repeated measures factor will be compared.

If you wanted to evaluate the interaction of the first two factors within the first level of the third factor, the appropriate set of coefficients would be:

Factor 1 (Position) 1 0 -1
  and: 0 1 -1
Factor 2 (Length) 1 -1  
Factor 3 (Meaning) 1 0  
Note: in this set of contrasts, you have to specify two sets of coefficients (an omnibus set of contrasts) for the first repeated measures factor because the first factor contains three levels, allowing for two independent comparisons. A detailed discussion of contrast analysis and the issue of independence (orthogonality) is beyond the scope of this introduction. You should refer to an ANOVA textbook (e.g., Lindman, 1978; Winer, 1962, 1971) to learn more about how to set up contrasts to test specific hypotheses (e.g., linear and nonlinear trends, with equal or unequal spacing, etc.). Note that the dialog for entering contrast coefficients (the Specify Contrasts for This Factor dialog) also contains options for specifying appropriate predefined contrasts; of particular interest are often the so-called Polynomial contrasts, which let you test linear and nonlinear trends across the levels of the respective factor.