[R-sig-eco] betadisper() and variation in community change

Gustaf Granath Gustaf.Granath at ebc.uu.se
Wed Oct 17 15:48:29 CEST 2012


Dear all,
I want to compare variation in plant community change over time among 
sites. The focus is quantify the species community change over time and 
not so much to test if the community has changed significantly. The 
sites do not share many species but I hope to investigate their 
variation over time.
I am a bit unsure if my approach using betadisper() is correct and maybe 
there are better ways to do this. Any input is appreciated.

For simplicity, say that we have 2 site with 4 and 2 subplots, 
respectively. These plots were measured with e.g. 5 years intervals.
The aim is to compare variation of plant community change over time 
between the two sites. Note that this is at the site level, not at the 
sub plot level.
library(vegan)
## Lets use the grazed/ungrazed example but here I treat it as
## 4 subplots (grazed) and 2 subplots (ungrazed). These
## subplots were sampled 4 times.
data(varespec)
dis <- vegdist(varespec)
sites <- factor(c(rep(1,16), rep(2,8)), labels = c("grazed","ungrazed"))
time<-c(rep(1:4,each=4),rep(1:4,each=2))
sites_time<-factor(paste(sites,time,sep="_"))
## Calculate multivariate dispersions for each
## site:time combination
mod1 <- betadisper(dis, sites_time)
#extract centroid positions for each site:time combination
cen.si<-scores(mod1, display = c("centroid"), choices = c(1,2))
# Calculate distance matrix
time.dist<-vegdist(cen.si,method="euclidean")
sites_main <- factor(c(rep(1,4), rep(2,4)), labels = c("grazed","ungrazed"))
# Run betadisper() on the site:time positions
mod2 <- betadisper(time.dist,sites_main)
#compare the two sites
boxplot(mod2)

#use 3 PCoA axis to get the 3D movement of the plant community
cen.si<-scores(mod1, display = c("centroid"), choices = c(1,2,3))
time.dist<-vegdist(cen.si,method="euclidean")
sites_main <- factor(c(rep(1,4), rep(2,4)), labels = c("grazed","ungrazed"))
mod3 <- betadisper(time.dist,sites_main)
boxplot(mod3)

Cheers,

Gustaf

-- 
Gustaf Granath
Dept of Plant Ecology and Evolution
Uppsala University



More information about the R-sig-ecology mailing list