[R] Doubt about nested aov output

John Wilkinson (pipex) wilks at dial.pipex.com
Wed Sep 7 13:03:44 CEST 2005

Ronaldo ,

It looks as though you have specified you model incorrectly.

In the Rats example ,the Treatment is the only fixed effect,Rat and Liver
are random effects

In aov testing for sig of 'Means' of Random Effects is pointless and that is
why 'p' values are not given.Further more the interaction between a Random
Effect and a Fixed Effect is also a Random Effect. The 'aov' with error
structure terms output reflects this by only giving 'p' values to
Fixed Effects and their interactions.

Note That the Fixed Effects of Block, Variety and their interaction
Block:Variety are given "p" values while the Field'Random Effects have not.

>  model <- aov(Glycogen~Treatment+Error(Rat/Liver))
> summary(model)

Error: Rat
          Df Sum Sq Mean Sq F value Pr(>F) #Rat is random effect
Residuals  1 413.44  413.44

Error: Rat:Liver				      #Rat:Liver is Random effect
          Df  Sum Sq Mean Sq F value Pr(>F)
Residuals  4 164.444  41.111

Error: Within
          Df  Sum Sq Mean Sq F value    Pr(>F)
Treatment  2 1557.56  778.78  18.251 8.437e-06 *** #Fixed effect
Residuals 28 1194.78   42.67
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

I hope that this is of help.


More information about the R-help mailing list