[R] adonis help - (non-parametric (permutational) manova)

Gavin Simpson gavin.simpson at ucl.ac.uk
Wed May 13 10:37:33 CEST 2009


On Tue, 2009-05-12 at 15:53 -0400, stephen sefick wrote:
> I am trying to apply this technique (M.J Anderson 2001) to a dataset
> of aquatic insect abundances.  There is a sample in the unrestored and
> restored segement of a stream for every time period.  I would like to
> compare the centroids of the distance matrices for the treatments up
> (unrestored) and dn (restored) to see if there is a difference in
> insect communities between the treatments.  I will not include the raw
> data in this posting as it is large for posting to the list; however,
> I would be happy to provide it off list if it would make this easier
> (and reproducible).
> 
> my environmental matrix (or factor matrix I am not sure of the
> terminology) is set up like this:
> 
>                 date    site
> 0104 dn   0104   dn
> 0106 dn   0106   dn
> 0203 dn   0203   dn
> 0503 dn   0503   dn
> 0704 dn   0704   dn
> 0803 dn   0803   dn
> 0804 dn   0804   dn
> 0805 dn   0805   dn
> 1005 dn   1005   dn
> 1102 dn   1102   dn
> 1204 dn   1204   dn
> 0104 up   0104   up
> 0106 up   0106   up
> 0203 up   0203   up
> 0503 up   0503   up
> 0704 up   0704   up
> 0803 up   0803   up
> 0804 up   0804   up
> 0805 up   0805   up
> 1005 up   1005   up
> 1102 up   1102   up
> 1204 up   1204   up
> 
> my site x species matrix is called a, so here is the call to adonis:
> 
> adonis(a~site, data=b, strata=b[,"date"] ,Permutations=999)

I don't think the permutations will be stratified correctly - you want
them to represent a time series yes? 'strata' is meant to define in
vegan. Samples within the strata are permuted. So if you only have two
samples per unique time point (1 for up and 1 for dn), the effect of
setting strata to the date variable will be to permute only pairs of
samples.

Work has begun (and stalled for a little while - my fault) on providing
a wider range of restricted permutation tests. The function
permuted.index2 in vegan can generate permutations for time series (or
other ordered observations), but you'd have to a) edit adonis in place
to use permuted.index2 and work out how to set up the call to this
function correctly so that it returns the permutation structure adonis
wants. Then check it does what it says it does - there is at least one
bug that I know of but I'm not fixing it as the development version on
my local machine has completely changed the way the permutation schemes
are specified. Contact me off-list if you would like some help with
this, though as I'm teaching for two weeks, I won't be able to look at
it until later.

For now, perhaps you could just ignore the time-series aspects and run
the analysis without strata, but require a far lower p-value than you
might normally use to reflect the fact that the permutations do not take
into account correlations between time points.

HTH

> 
> Is this the correct way of testing the null hypothesis that :
> 
> There is no difference in community structure between treatments.
> 
> Thank you very much in advance, and anything that you need to make
> this easier please don't hessitate to ask.
> 
> regards,
> 
-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 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-help mailing list