Skip to content

adonis model specification

5 messages · Peter Solymos, Christine Griffiths, Jari Oksanen

#
Dear R helpers,

I have collected species composition data (counts of 24 species)from 16
plots. I am interested in seeing how different the plots are from each
other and how this changes over time.

My design is as follows: I repeatedly sampled the plots each month for 11
months. The plots are grouped into three treatments (1-3), which were
replicated 6 times (blocks 1-6). I have unbalanced data in that I lost 2
replicates from 2 of the treatments, so I have only 16 plots in total.
package. Having had a look at the set up of the dune data example, I have
set up my data in the same format. Below is an idea of my data.
I have 16 plots * 11 months = 176 sites. Since in 3 of these there were no
species, I only have 173 sites.

dataset.plot.env[1:5,]
  ID Area Treatment Block BlockID Month
1  1    1         1     1       1     1
2  2    1         1     2       2     1
3  3    1         1     3       3     1
4  4    2         1     4       4     1
5  5    2         1     5       5     1

block<-as.factor(Block)
month<-as.factor(Month)
area<-as.factor(Area)
treatment<-as.factor(Treatment)

### data is counts. x? are species.
dataset.plot.count[1:5,1:15]
  X5 X6 X7 X8 X9 X11 X12 X13 X14 X15 X16 X17 X18 X19 X20
1 11  2  1  0 58  10  28 137   0   0  87  18  68  10   0
2  6 10  2  0 36   1  26 192  65   0   6  35  94  14   0
3  2  0  0  0 27  41  33 394  16   0   3  14   4  16   0
4 22 54  7  0 26  42  10 275 137   4  22  10  30   1   0
5  1  5 10  0  0  19  45 599  60   0   6   3   0   5   0

library(vegan)
data1<-vegdist(dataset.plot.count,method="morisita")

## since I am using count data I chose morisita index.
## I read that first I needed to convert my data into a dissimilarity
## matrix. Or is this not necessary if I stipulate method in the adonis
## function?

m1<-adonis(data1~treatment,data=dataset.plot.env,permutation=200,method="mo
risita")
summary(m1)

If I do either of the above or the following, I get this result.
m1<-adonis(dataset.plot.count~treatment,data=dataset.plot.env,permutation=2
00,method="morisita")
summary(m1)

             Length Class      Mode
aov.tab        6    data.frame list
call           4    -none-     call
coefficients   0    -none-     NULL
coef.sites   519    -none-     numeric
f.perms      200    -none-     numeric
model.matrix 519    -none-     numeric
terms          3    terms      call
I am unsure exactly of what I am doing wrong or what I need to specify. I
would be grateful for any help and guidance.

I have read that I can use strata to specify a time series. If so would I
code it like this:
m1<-adonis(dataset.plot.count~treatment,data=dataset.plot.env,strata=datase
t.plot.env[,"Month"],permutation=200,method="morisita")
## This doesn't work either though.

I had originally planned on doing MRPP but having read that it is less
robust I opted for adonis. With MRPP, I was going to test the difference in
species composition between treatments at each month as I think I am unable
to test this for the whole study. Using adonis, do I need to do a number of
tests or can I simply run the following?

m1<-adonis(dataset.plot.count~treatment*month*block,data=dataset.plot.env,s
trata=dataset.plot.env[,"Month"],permutation=200,method="morisita")

I have had a look at Oksanen 2009, Multivariate Analysis of Ecological
Communities in R: vegan tutorial. I have not been able to find much more
information on adonis. Could anyone direct me to more literature please.

Any help would be much appreciated.

many thanks
Christine
#
Christine,

There is no summary method for adonis. After calling the function,
simply use print:
x <- adonis(...)
x

And you are right, you can supply raw data and use the method argument
in adonis to define dissimilarity index (which is "bray" by default).

Cheers,

Peter

P?ter S?lymos
Alberta Biodiversity Monitoring Institute
Department of Biological Sciences
CW 405, Biological Sciences Bldg
University of Alberta
Edmonton, Alberta, T6G 2E9, Canada
Phone: 780.492.8534
email <- paste("solymos", "ualberta.ca", sep = "@")



On Tue, Sep 29, 2009 at 3:47 AM, Christine Griffiths
<Christine.Griffiths at bristol.ac.uk> wrote:
#
Christine,

There is no summary method for adonis. After calling the function,
simply use print:
x <- adonis(...)
x

And you are right, you can supply raw data and use the method argument
in adonis to define dissimilarity index (which is "bray" by default).

Cheers,

Peter

P?ter S?lymos
Alberta Biodiversity Monitoring Institute
Department of Biological Sciences
CW 405, Biological Sciences Bldg
University of Alberta
Edmonton, Alberta, T6G 2E9, Canada
Phone: 780.492.8534
email <- paste("solymos", "ualberta.ca", sep = "@")



On Tue, Sep 29, 2009 at 3:47 AM, Christine Griffiths
<Christine.Griffiths at bristol.ac.uk> wrote:
#
Dear Jari and Peter

Thanks for the help. It works fine now. Glad it was that simple. :-)

I have a number of queries:
(1) I am a bit skeptical about the output in that if I run variations of 
the model, with treatment alone or treatment * block, with or without 
specifying month as strata, then I get the same p-values = 0.004975 for all 
factors. This is likely to be a foolish misinterpretation of the results or 
misspecification of the model. Should I be concerned about this?

Call:
adonis(formula = dataset.plot.count ~ treatment * month, data = 
dataset.plot.env,      permutations = 200, method = "morisita", strata = 
dataset.plot.env[,          "Month"])

                        Df  SumsOfSqs    MeanSqs    F.Model     R2   Pr(>F) 

treatment       2.0000e+00 1.5313e-01 7.6565e-02 1.1603e+01 0.1033 0.004975 
**
month           1.0000e+00 1.7446e-01 1.7446e-01 2.6439e+01 0.1177 0.004975 
**
treatment:month 2.0000e+00 5.3241e-02 2.6621e-02 4.0342e+00 0.0359 0.004975 
**
Residuals       1.6700e+02 1.1020e+00 6.5987e-03            0.7432 

Total           1.7200e+02 1.4828e+00                       1.0000 

---
Signif. codes:  0 ?***? 0.001 ?**? 0.01 ?*? 0.05 ?.? 0.1 ? ? 1


(2) Is this the correct way to specify the null hypothesis: there is no 
difference between treatments over time? Can I account for block variation 
as a random effect?

(3) Because I am interested in testing if my blocks are reliable replicates 
of each other, ie have a similar species composition to start with. Do I 
need to specify this separately as below for time 1? I.e. not including the 
temporal pseudoreplication.
m1<-adonis(dataset.plot.count~treatment*block,data=dataset.time1,permutation=200,method="morisita")

I am aware that these are not purely R related questions, so if there is 
any  easily digestible literature describing the technique in depth, I 
would greatly appreciate being directed towards it.

Many thanks in advance,

Cheers
Christine

--On 29 September 2009 07:59 -0600 Peter Solymos <solymos at ualberta.ca> 
wrote:
#
On 29/09/09 17:41 PM, "Christine Griffiths"
<Christine.Griffiths at bristol.ac.uk> wrote:

            
Christine,

You asked for 200 permutations, and the statistic is one (or 201st) of them,
and if your statistic is the first one (most extreme), then you get
[1] 0.004975124

If you ask for 199 permutations, the lowest possible value will be 1/200
which doesn't look quite as foolish.

There was a version of adonis, where one was dropped of the number of
permutations if people asked for even hundred. In that version you would
have got 199 permutations if you asked for 200. However, after discussing
with other developers, I decided that is too patronizing: what are we to say
that you should use 199 permutations if you say you want to have 200.

Cheers, Jari Oksanen