Hi folks,

I am trying to figure out how run a repeated measures ANOVA on the  
following data set.

    subject trial frequency dplvl
1  FSI052A     A         1    NA
2  FSI052B     B         1    NA
3  FSI053A     A         1    NA
4  FSI055A     A         1    NA
5  FSI055B     B         1    NA
6  FSI057A     A         1    NA
7  FSI057B     B         1    NA
8  FSI058A     A         1    NA
9  FSI058B     B         1 12.93
10 FSI060A     A         1    NA
11 FSI060B     B         1    NA
12 FSI067A     A         1    NA
13 FSI070A     A         1    NA
14 FSI070B     B         1    NA
15 FSI075A     A         1    NA
16 FSI075B     B         1    NA
17 FSI078A     A         1    NA
18 FSI078B     B         1    NA
19 FSI052A     A         2 13.65
20 FSI052B     B         2 11.71
21 FSI053A     A         2 20.91
22 FSI055A     A         2  9.52
23 FSI055B     B         2 13.43
24 FSI057A     A         2 14.57
25 FSI057B     B         2 10.00
26 FSI058A     A         2 14.95
27 FSI058B     B         2 16.97
28 FSI060A     A         2 13.06
29 FSI060B     B         2  7.96
[...]


Both "frequency" and "trial" are factorized.

 > is.factor(trial)
[1] TRUE
 > is.factor(frequency)
[1] TRUE
 > levels(frequency)
[1] "1" "2" "3" "4" "6"

I know that I should be using 'lme' rather than aov, but....

 > summary(aov(dplvl~trial*frequency+Error(subject/ 
(trial*frequency)),data=tenB))

Error: subject
                 Df Sum Sq Mean Sq F value Pr(>F)
trial            1   7.15    7.15  0.2566 0.6203
frequency        1  40.84   40.84  1.4657 0.2461
trial:frequency  1   0.03    0.03  0.0013 0.9723
Residuals       14 390.11   27.86

Error: subject:frequency
                 Df  Sum Sq Mean Sq F value   Pr(>F)
frequency        1 183.893 183.893  11.925 0.003271 **
trial:frequency  1  16.393  16.393   1.063 0.317866
Residuals       16 246.738  15.421
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Error: Within
           Df Sum Sq Mean Sq F value Pr(>F)
Residuals 35 269.13    7.69

What I do not understand is why I am getting df=1 for frequency when  
there are 5 levels of that factor.

Thanks for all your help.

Regards,
Sumit


	[[alternative HTML version deleted]]

