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

Gavin Simpson gavin.simpson at ucl.ac.uk
Mon Oct 22 13:57:42 CEST 2012


betadisper() will give you a test of homogeneity of variance between
groups; in other words it tests the null that the variance of the groups
of sites does not change. adonis() is a test of location, which will
test the null of no compositional change between groups of sites. Here I
assume by groups of sites, "groups" is defined by the time points of
sampling?

It is somewhat unclear what you mean by "variation in plant community
change over time among sites". Do you want to know if on average the
composition of your groups of sites is changing through time? Or do you
want to know something about change over time in that compositional
change. The former could be done by adonis() the latter could be seen as
an analysis of the first derivative of the change given by adonis() and
I don't think we have anything for that easily to hand in vegan or R.

Perhaps you could describe more clearly what it is that you hope to
show/demonstrate?

I have some rough code implementing an idea of Jari's (and a colleague
of his) for a better way of quantifying rates of composition change and
total amount of composition change:

Rate of compositional turnover along gradients and total gradient
length. Journal of Vegetation Science 6, 815-824. JO & Tonteri, T.

But you would have to do that for each site individually and then
perform some other test if you want to group data. The code is far from
production - it was a proof of concept using smooth.spline() which
doesn't really model the mean-variance relationship of abundance or
compositional data properly, but it had analytical derivatives via the
predict() method so it got used out of convenience rather than fitting
via mgcv:::gam() and having to derive derivatives via finite differences
(which is easy but tedious).

HTH

G

On Wed, 2012-10-17 at 15:48 +0200, Gustaf Granath wrote:
> 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
> 

-- 
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
 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