Thanks Gavin. Let me try to explain what Im trying to do.

My data are hierarchically structured, I have subplots within sites and  
these subplots are measured over many years. I want to compare how 
vegetation composition varies over time at the site level (a bit like 
the example in Zuur 2007, pp 463, but more sites, not only two). In 
addition, not mentioned in my earlier question, I also want to compare 
the site variation with subplot variation. I guess you can see it as I 
want to quantify how much the site centroids move around in an 
ordination with how much the subplots centroids move around on average 
over time. So if I had one response variable, this would be a rather 
simple task in a mixed-model where I can extract the different variance 
components - the problem is to do this with multivariate data (can you 
say variance of compositional change?).

The reason for this kind of analyses is that we have hypotheses 
regarding how species composition in different habitats varies over 
time, some sites are predicted to vary more than others. In addition, we 
want to investigate if the within-site variation also differs. For 
example, a site may show little compositional variation over time 
overall, but the subplots may show large variation.

Gustaf


On 2012-10-22 13:57, Gavin Simpson wrote:
> 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
>>

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


	[[alternative HTML version deleted]]

