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.
From what I have read, I want to use the adonis function in the vegan
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