Skip to content
Prev 2494 / 7420 Next

aov vs. glm

Hi Lara,

Thanks for posting your results.  It makes things clearer.

Now, I'm not sure about how to fix this easily but I do know what the 
problem is (I think).  It is to do with different types of sums of 
squares.  There is also a smaller issue of types of test as well...

The summary( glm( ...)) is giving t-tests for each of the coefficients.  
If you had more than two levels of each of treatment and species then 
this would be very obvious.  The summary( aov(...)) is giving you a 
complete anova table, an F-test.

The two types of test (t and F) should agree BUT the anova table is 
(likely to be) giving type 1 sums of squares.  If you wanted the 
analyses to agree you will want type 3 sums of squares.  I'm making no 
comment about which sums of squares you want...  I also don't know how 
to get them easily (just do a net search to get solutions using drop1, 
lme and others). Be careful of marginalilty though.  I would be tempted 
to calculate the F-statistics by hand -- all the mean squares are there 
(I'm probably unique here though)

Note that the test for the last term in the anova table 
(treatment:species) gives agreement between the model types. This is 
because the type 1 and type 3 sums of squares agree for the last term.

There is *lots* of information and opinion about which type of sums of 
squares to use.  It is a debate that has been raging for decades.  I 
will point you to Bill Venables' contribution (Section 5 of Exegese on 
Linear Models -- sorry I don't have a url).

I hope that this helps.  It should at least give you the right keywords 
to Google.

Good luck,

Scott
On 11/11/11 12:23, Lara R. Appleby 04 wrote: