Thursday, 28 March 2013

R and ANOVA

I have been spending time trying to prepare a course on ANOVA. Now I know what I am teaching, this is not a problem but there are two approaches and I am wondering which is better. There is the traditional approach that clearly distinguishes ANOVA from Regression and there is the more technical approach that sees them as two versions of the same thing. The problem is that in R you have both approaches programmed in.

aov is the traditional approach and a lot of the specific things people who like to use ANOVA are available only for this approach. So there is an easy way to do multi-comparison testing and also to do inspection graphs. It therefore is easier for a beginner

lm is the technical approach and has the power of being generalisable to a wide number of situations but a lot of the things that are implemented for aov are not implemented for lm as easily. So I end up writing a lot more complex set of coding.

I think I am going to write two scripts one which uses the aov approach and one that uses lm and this will let people choose but I will just run through using aov.

No comments:

Post a Comment