# Optimal data structure for 2-way repeated measures ANOVA

This must be a very basic question, but I'm trying to do a 2-way repeated measures ANOVA (in Statistica and/or SPSS), and was wondering:

1. in what way to (re)structure my data so it is most flexible for further analyses?

2. what way to go in Statistica or SPSS? (univariate GLM?)

In my case:

• Subjects obtain a score (1-100) in describing (30!!) animals
• They do this 3 times, using only conceptual (C), visual (V), or auditory (A) information.
• The resulting data is currently formatted as follows, with one subject a case:
           dog        cat      ...
Sbj  C  V  A    C  V  A    ...
s1   64 78 34   61 63 39   ...
s2   78 89 31   68 77 45   ...
...  .. .. ..   .. .. ..   ...


So factors are animal {dog,cat,...} and source {C,V,A}.

I have tried a 4 variable format as well:

Sbj Animal Source Value
s1 dog C 64
...


but:

1. This breaks the one-subject-per-case rule that the repeated measures ANOVA procedures in SPSS and Statistica rely on.

In either case, SPSS requires me to specify all factor-levels manually which does not work as they are not variables, and moreover involves 20 levels! (in case of animal).

Both your repeated-measures factors are fixed factors, so it make no difference whether you you use wide structure of the data (your 1st table) with Repeated-measures GLM procedure or long structure of the data (your 2nd table) with Univariate GLM procedure (speaking of SPSS now).

For 1st structure

GLM
dog_c dog_v dog_a cat_c cat_v cat_a
/WSFACTOR = animal 2 source 3
/METHOD = SSTYPE(3)
/WSDESIGN = animal source animal*source.


For 2nd structure

GLM
value BY animal source sbj
/RANDOM = sbj
/METHOD = SSTYPE(3)
/DESIGN = animal source sbj animal*source animal*sbj source*sbj animal*source*sbj.


will yield identical significances for factors ANIMAL, SOURCE, ANIMAL*SOURCE (interaction).