[R-sig-eco] adonis and contrasts
Christine Griffiths
Christine.Griffiths at bristol.ac.uk
Mon Apr 26 12:42:00 CEST 2010
Dear All,
I have done pairwise comparisons of species compositions between three
treatments (1 v 2, 1 v 3, and 2 v 3) which were replicated 6 times (i.e. 6
blocks). To avoid multiple testing I have decided to use contrasts instead
(treatments 1 v 2 + 3, and 2 v 3). Oksanen (2009) mentions that this can be
done, but when I have tried to incorporate the contrasts, either it doesn't
run or the output suggests that the contrast has not been addressed.
Below is an example of the model I ran before wanting to add a contrast:
m1<-adonis(dat~Treatment,data=datenv,strata=datenv[,"Block"],permutation=1000,method="bray")
How do I add the following contrasts into the above model?
treatment<-as.factor(Treatment)
contrasts(treatment)<-cbind(c(-2,1,1),c(0,-1,1))
contrasts(treatment)
[,1] [,2]
1.Control -2 0
2.Radiata 1 -1
3.Aldabra 1 1
If this is not possible, is it acceptable to sum the species presence in
the grouped treatments (2 + 3) and divide by 2, then combine this data to
that of treatment 1 to form a matrix? However, as I would not be able to do
more than one contrast, then I don't really overcome the problem of
multiple testing.
I hope this makes sense. Many thanks in advance for any assistance.
Cheers Christine
More information about the R-sig-ecology
mailing list