[R-sig-eco] ANOSIM in vegan

Gavin Simpson gavin.simpson at ucl.ac.uk
Wed Nov 24 11:13:02 CET 2010


On Thu, 2010-11-11 at 19:23 -0500, Soumi Ray wrote:
> Hi,
> 
> I have a dataset consisting of species collected from the same location
> during 2 time periods - i want to see if the community composition is
> similar during the two time periods. My entire dataset is presence/absence
> (0/1) data. There are around 23 species and 400 samples (during each time
> period, so a total of 800 samples). Will ANOSIM from the vegan package be an
> right test to apply? I was going through some papers online where they have
> used methods like db-RDA in similar situations. Would it be right to use it
> for qualitative data? Any suggestion would be of great help.
> 
> Thanks,
> 
> Soumi

Soumi,

You can't do what you want with these methods. Think about what you are
trying to do? You want to know if the community composition is the same
(or similar enough) at two time points. This is a test of equivalence
and is the exact opposite of what we normally test in classical
statistics. We normally test for a difference in the response due to one
or more covariates. In other words, the one or more covariates can
explain variation in the response. We test whether the amount of
variation explained is large relative to the unexplained variation. If
there is no difference, then there is nothing to explain.

If you were to run your analysis through adonis() or similar, we would
test the amount of variation in the response explained by TIME to see if
it were as larger or larger than some extreme quantiles of a
permutation-derived null distribution of variations explained when there
is no difference between the community composition of the two time
periods. This means we set up the Null of no difference and the
Alternative of some difference. We see if the test statistic is likely
to have arisen under the Null. If it is, we say we have evidence
*against* the Null and reject it in favour of the Alternative. We have
not tested the Alternative.

You are interested in the opposite; that there *isn't* a difference.
But, you can't use the fact that you get an insignificant result from
the above test as evidence in support of the Null as the permutation
p-value (just like any other p-value) tells you nothing about the
probability of the Null hypothesis (the thing you are actually
interested in) being TRUE - it is a uniform random variable in such
circumstances.

In short, you can test for a difference, but not for no difference in
community composition.

Andrew Robinson has a package on CRAN to do equivalence tests:

http://cran.r-project.org/web/packages/equivalence/index.html

but it is not set-up to do the sort of analysis you want with ANOSIM.
Whether you could process your species data in some way so that you
could use his code is another matter, but beyond the scope of an email
list for help.

Please note I have no idea what papers you referred to above and the
comments I make are not comments on their methodology. For all I know,
their Alternative was one of difference and thus they were right to use
normal methods.

HTH

G
-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 Dr. Gavin Simpson             [t] +44 (0)20 7679 0522
 ECRC, UCL Geography,          [f] +44 (0)20 7679 0565
 Pearson Building,             [e] gavin.simpsonATNOSPAMucl.ac.uk
 Gower Street, London          [w] http://www.ucl.ac.uk/~ucfagls/
 UK. WC1E 6BT.                 [w] http://www.freshwaters.org.uk
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%



More information about the R-sig-ecology mailing list