Skip to content

aov function syntax

4 messages · Brian Ripley, Dave Deriso

#
What are you trying to do?  Your example is not what is commonly 
called ANOVA (some call it ANCOVA) and more often lm() is used.

I suspect that you intended 'population' to be a factor, and it is 
not.  So population:condition is not an interaction but different 
slopes for population by levels of condition.

population*condition expands to

population + condition + population:condition

and this is a larger model with different intercepts by levels of 
condition.

I suggest you need study the primary reference (Chambers & Hastie 
1992) or at least Bill Venables' exposition in MASS (the book, any 
edition).  And note that you cannot test interactions in a two-way 
layout without replication, so perhaps you also need to talk to a 
statistician about ANOVA.

BTW: I think you have messed up your first example: perhaps you meant

studentDataSource="http://files.davidderiso.com/r/studentData.data"

There are no P values in that example because there is no residual 
variation: the model fits exactly.
On Sat, 9 Jan 2010, Dave Deriso wrote: