[R] factor differences in anova

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Apr 14 15:47:54 CEST 2003


On 14 Apr 2003, wouter buytaert wrote:

> Hello,
> 
> (maybe a quite basic statistical question, but I'm just struggling with
> it)
> 
> I'm doing an anova:
> 
> > Res1<-aov(H2O~location+topo+horizon+pF+Error(location:topo:horizon))
> 
> (water retention of soils)
> 
> which gives a significant difference at factor "location".
> 
> Which function should I use to now which locations (there are 3: A, B
> and C) differ significantly and which do not?

Possibly TukeyHSD or package multicomp.  However, we would need to know a 
bit more about the design, as that's a rather peculiar Error() 
specification and you would need to be careful to apply these functions in 
the right stratum (assuming the location effect only occurs in one).

Function se.contrast would also be useful, and as there are only three
pairwise differences, multiple comparison issues are going to be minor
(especially as you have tested for an overall difference first).

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list