Abstract
A simple analytical procedure to test for differences in beta diversity among sets of plots has been recently presented. Here, we describe an improved randomization procedure that replaces the one previously proposed. This procedure consists of shuffling within-group dissimilarities among groups and disregarding between-group dissimilarities. By repeating this operation many times, a distribution of the test statistics under the null hypothesis of no differences in the mean plot-to-plot dissimilarities within groups is obtained. This procedure ensures that the correct null model is selected. To describe this new procedure, we used plant and water beetle (Coleoptera) data collected from 45 permanent ponds. Beta diversity was compared between plant and water beetle (Coleoptera) assemblages.
References
Anderson MJ (2001) A new method for non-parametric multivariate analysis of variance. Austral Ecol 26:32–46
Anderson MJ (2006) Distance-based tests for homogeneity of multivariate dispersions. Biometrics 62:245–253
Bacaro G, Gioria M, Ricotta C (2012) Testing for differences in beta diversity from plot-to-plot dissimilarities. Ecol Res 27:285–292
Fortin MJ, Payette S (2002) How to test the significance of the relation between spatially autocorrelated data at the landscape scale: a case study using fire and forest maps. Ecoscience 9:213–218
Gioria M, Schaffers A, Bacaro G, Feehan J (2010) The conservation value of farmland ponds: predicting water beetle assemblages using vascular plants as a surrogate group. Biol Conserv 143:1125–1133
Gioria M, Bacaro G, Feehan J (2011) Evaluating and interpreting cross-taxon congruence: Potential pitfalls and solutions. Acta Oecol 37:187–194
Gotelli NJ (2000) Null model analysis of species co-occurrence patterns. Ecology 81:2606–2621
Legendre P, Borcard D, Peres-Neto PR (2005) Analyzing beta diversity: partitioning the spatial variation of community composition data. Ecol Monogr 75:435–450
Ricotta C, Burrascano S (2009) Testing for differences in beta diversity with asymmetric dissimilarities. Ecol Indic 9:719–724
R Development Core Team (2012) R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. ISBN 3-900051-07-0. http://www.R-project.org/
Author information
Authors and Affiliations
Corresponding author
Appendix I
Appendix I
R function ‘BetaDispersion 2.0’
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License http://www.gnu.org/licenses/.
Disclaimer: users of this code are cautioned that, while due care has been taken and it is believed accurate, it has not been rigorously tested and its use and results are solely the responsibilities of the user.
Description: The function ‘BetaDispersion 2.0’ performs test for differences in beta diversity among distinct groups of plots. The test is based on any pairwise plot-to-plot dissimilarity matrix of choice that is reasonable for analyzing specific aspects of ecological data. Given such a pairwise dissimilarity matrix, BetaDispersion compares with ANOVA the mean of the plot-to-plot dissimilarities among groups. A distribution of values of the test-statistic under the null hypothesis is then obtained by randomization of the within-group dissimilarities among groups without replacement.
Dependencies: vegan package
Usage: betadispersion2(data, factor, permutations = 9,999)
Arguments
data: an n x n matrix of distances or an object of class “dist” (as obtained by functions as vegdist or gowdis).
factor: vector describing the group structure, usually a factor or an object that can be coerced to a factor using ‘as.factor’.
permutations: Number of replicate permutations used for the hypothesis tests (F tests). If not provided, the default value of 9,999 is assumed (please note that the function is time-consuming for large data sets if 9,999 randomizations are selected)
Outputs:
The function returns a list of two objects:
1. ‘anova table’: typical analysis of variance table showing sources of variation, degrees of freedom, sequential sums squares, mean squares, F statistics and p value, based on the selected number of permutations.
2. Mean within group dissimilarities.
Details: Significance is tested using F tests based on sequential sums of squares from permutations of the raw data, and not permutations of residuals. Permutations of the raw data may have better small sample characteristics. Further, the precise meaning of hypothesis tests will depend upon precisely what is permuted.
FUNCTION SYNTAX
betadispersion2<-function(data, factor, permutation)
{
require(vegan)
x<-as.dist(data)
x.estend <- as.vector(x)
if (missing(permutation) )
permutation<- 9,999
N <- attributes(x)$Size
grouping <- as.factor(factor)
matched <- function(irow, icol, grouping) {
grouping[irow] == grouping[icol]
}
irow <- as.vector(as.dist(row(matrix(nrow = N, ncol = N))))
icol <- as.vector(as.dist(col(matrix(nrow = N, ncol = N))))
within <- matched(irow, icol, grouping)
cl.vec <- rep(“Between”, length(x))
take <- as.numeric(irow[within])
cl.vec[within] <- levels(grouping)[grouping[take]]
cl.vec <- factor(cl.vec, levels = c(“Between”, levels(grouping)))
frame<-data.frame(x.estend, cl.vec)
reduced<-frame[!cl.vec==“Between”,]
oneway <- lm(x.estend ~ cl.vec, data=reduced)
promo<-anova(oneway,test=“F”)
F.mod<-promo[1,4]
Average_Beta_Within<-tapply(reduced$x.estend, list(cl.vec=reduced$cl.vec), mean, na.rm=TRUE)
permF <-array(dim=c(permutation,1))
for (i in 1:permutation)
{
permutated<-sample(reduced$x.estend)
model<- lm(permutated ~ reduced$cl.vec)
vin<-anova(model,test=“F”)
permF[i,1]<-vin[1,4]
}
tab <- data.frame(Df = promo[,1], SumsOfSqs = promo[,2],
MeanSqs = promo[,3], F.Model = promo[,4],
P = c((rowSums(t(permF) >= F.mod) + 1)/(permutation + 1), NA))
rownames(tab) <- c(“Factor”,”Residuals”)
colnames(tab)[ncol(tab)] <- “Pr(>F)”
class(tab) <- c(“anova”, class(tab))
Average_Beta_Within<-data.frame(Average_Beta_Within)
col1<-row.names(Average_Beta_Within)
col2<-Average_Beta_Within[,1]
Summary_beta<-data.frame(col1,col2)
Summary<-data.frame(Summary_beta[2:nrow(Summary_beta),])
colnames(Summary)<-c(“Group”, “Average Beta”)
output<-list(tab,Summary)
output
}
Example (require the “vegan” library)
data(dune)
data(dune.env)
dune.dist <- vegdist(dune)
attach(dune.env)
betadispersion2(dune.dist, Management,999)
About this article
Cite this article
Bacaro, G., Gioria, M. & Ricotta, C. Beta diversity reconsidered. Ecol Res 28, 537–540 (2013). https://doi.org/10.1007/s11284-013-1043-z
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11284-013-1043-z