Vegan: Ecological Diversity
Total Page:16
File Type:pdf, Size:1020Kb
Vegan: ecological diversity Jari Oksanen processed with vegan 2.5-7 in R Under development (unstable) (2020-11-27 r79520) on November 27, 2020 Abstract The vegan package has two major components: multivariate analysis (mainly ordination), and This document explains diversity related methods methods for diversity analysis of ecological commu- in vegan. The methods are briefly described, and nities. This document gives an introduction to the the equations used them are given often in more latter. Ordination methods are covered in other detail than in their help pages. The methods dis- documents. Many of the diversity functions were cussed include common diversity indices and rar- written by Roeland Kindt, Bob O'Hara and P´eter efaction, families of diversity indices, species abun- S´olymos. dance models, species accumulation models and Most diversity methods assume that data are beta diversity, extrapolated richness and probabil- counts of individuals. The methods are used with ity of being a member of the species pool. The other data types, and some people argue that document is still incomplete and does not cover all biomass or cover are more adequate than counts diversity methods in vegan. of individuals of variable sizes. However, this doc- ument mainly uses a data set with counts: stem counts of trees on 1 ha plots in the Barro Colorado Contents Island. The following steps make these data avail- able for the document: 1 Diversity indices 1 > library(vegan) > data(BCI) 2 Rarefaction 2 3 Taxonomic and functional diversity 3 3.1 Taxonomic diversity: average dis- 1 Diversity indices tance of traits . 3 Function diversity finds the most commonly used 3.2 Functional diversity: the height of diversity indices (Hill, 1973): trait tree . 4 S 4 Species abundance models 4 X H = − pi logb pi Shannon{Weaver (1) 4.1 Fisher and Preston . 4 i=1 4.2 Ranked abundance distribution . 5 S X 2 D1 = 1 − pi Simpson (2) 5 Species accumulation and beta diver- i=1 sity 6 1 D2 = inverse Simpson ; (3) 5.1 Species accumulation models . 6 PS 2 i=1 pi 5.2 Beta diversity . 7 where pi is the proportion of species i, and S is 6 Species pool 8 PS the number of species so that i=1 pi = 1, and b 6.1 Number of unseen species . 8 is the base of the logarithm. It is most common 6.2 Pool size from a single site . 10 to use natural logarithms (and then we mark index 6.3 Probability of pool membership . 11 as H0), but b = 2 has theoretical justification. The 1 default is to use natural logarithms. Shannon index is calculated with: 26 48 14 4.5 > H <- diversity(BCI) 4.0 which finds diversity indices for all sites. 3.5 Vegan does not have indices for evenness (equi- 3.0 tability), but the most common of these, Pielou's 2.5 evenness J = H0= log(S) is easily found as: 2.0 1.5 > J <- H/log(specnumber(BCI)) 20 3 40 diversity 4.5 where specnumber is a simple vegan function to 4.0 find the numbers of species. 3.5 vegan also can estimate series of R´enyi and Tsal- 3.0 lis diversities. R´enyi diversity of order a is (Hill, 2.5 1973): 2.0 S 1 X 1.5 H = log pa ; (4) 00.250.51 2 4 8 163264Inf 00.250.51 2 4 8 163264Inf 00.250.51 2 4 8 163264Inf a 1 − a i i=1 and the corresponding Hill number is Na = Figure 1: R´enyi diversities in six randomly selected exp(Ha). Many common diversity indices are spe- plots. The plot uses Trellis graphics with a separate 0 cial cases of Hill numbers: N0 = S, N1 = exp(H ), panel for each site. The dots show the values for N2 = D2, and N1 = 1=(max pi). The correspond- sites, and the lines the extremes and median in the 0 ing R´enyi diversities are H0 = log(S), H1 = H , data set. P 2 H2 = − log( pi ), and H1 = − log(max pi). Tsal- lis diversity of order q is (T´othm´er´esz, 1995): S ! 2 Rarefaction 1 X H = 1 − pq : (5) q q − 1 i=1 Species richness increases with sample size, and dif- ferences in richness actually may be caused by dif- These correspond to common diversity indices: ferences in sample size. To solve this problem, we H = S − 1, H = H0, and H = D , and can 0 1 2 1 may try to rarefy species richness to the same num- be converted to Hill numbers: ber of individuals. Expected number of species in 1 a community rarefied from N to n individuals is N = (1 − (q − 1)H ) 1−q : (6) q q (Hurlbert, 1971): We select a random subset of five sites for R´enyi diversities: S N−xi X n S^n = (1 − qi) ; where qi = : (7) > k <- sample(nrow(BCI), 6) N i=1 n > R <- renyi(BCI[k,]) We can really regard a site more diverse if all of its Here x is the count of species i, and N is the R´enyi diversities are higher than in another site. i n We can inspect this graphically using the standard binomial coefficient, or the number of ways we can plot function for the renyi result (Fig. 1). choose n from N, and qi give the probabilities that species i does not occur in a sample of size n. This Finally, the α parameter of Fisher's log-series can is positive only when N − x ≥ n, but for other be used as a diversity index (Fisher et al., 1943): i cases qi = 0 or the species is sure to occur in the > alpha <- fisher.alpha(BCI) sample. The variance of rarefied richness is (Heck 2 et al., 1975): 3 Taxonomic and functional 2 diversity s = qi(1 − qi) S "N−xi−xj # Simple diversity indices only consider species iden- X X + 2 n − q q : (8) tity: all different species are equally different. In N i j i=1 j>i n contrast, taxonomic and functional diversity in- dices judge the differences of species. Taxonomic Equation 8 actually is of the same form as the vari- and functional diversities are used in different fields ance of sum of correlated variables: of science, but they really have very similar reason- ing, and either could be used either with taxonomic S X X X X or functional traits of species. VAR xi = VAR(xi)+2 COV(xi; xj) : i=1 j>i (9) 3.1 Taxonomic diversity: average The number of stems per hectare varies in our distance of traits data set: The two basic indices are called taxonomic diver- > quantile(rowSums(BCI)) sity ∆ and taxonomic distinctness ∆∗ (Clarke and 0% 25% 50% 75% 100% Warwick, 1998): 340.0 409.0 428.0 443.5 601.0 PP !ijxixj To express richness for the same number of individ- ∆ = i<j (10) uals, we can use: n(n − 1)=2 PP ! x x ∗ i<j ij i j > Srar <- rarefy(BCI, min(rowSums(BCI))) ∆ = PP : (11) i<j xixj Rarefaction curves often are seen as an objective solution for comparing species richness with differ- These equations give the index values for a single ent sample sizes. However, rank orders typically site, and summation goes over species i and j, and differ among different rarefaction sample sizes, rar- ! are the taxonomic distances among taxa, x are efaction curves can cross. species abundances, and n is the total abundance As an extreme case we may rarefy sample size to for a site. With presence{absence data, both in- two individuals: dices reduce to the same index called ∆+, and for this it is possible to estimate standard deviation. > S2 <- rarefy(BCI, 2) There are two indices derived from ∆+: it can be This will not give equal rank order with the previ- multiplied with species richness1 to give s∆+, or ous rarefaction richness: it can be used to estimate an index of variation in taxonomic distinctness Λ+ (Clarke and Warwick, > all(rank(Srar) == rank(S2)) 2001): [1] FALSE PP !2 Λ+ = i<j ij − (∆+)2 : (12) Moreover, the rarefied richness for two individuals n(n − 1)=2 is a finite sample variant of Simpson's diversity in- We still need the taxonomic differences among dex (Hurlbert, 1971) { or more precisely of D1 + 1, species (!) to calculate the indices. These can be and these two are almost identical in BCI: any distance structure among species, but usually > range(diversity(BCI, "simp") - (S2 -1)) it is found from established hierarchic taxonomy. Typical coding is that differences among species in [1] -0.002868298 -0.001330663 the same genus is 1, among the same family it is 2 Rarefaction is sometimes presented as an ecolog- etc. However, the taxonomic differences are scaled ically meaningful alternative to dubious diversity 1This text normally uses upper case letter S for species indices (Hurlbert, 1971), but the differences really richness, but lower case s is used here in accordance with seem to be small. the original papers on taxonomic diversity 3 3.2 Functional diversity: the height of trait tree 80 In taxonomic diversity the primary data were tax- onomic trees which were transformed to pairwise distances among species. In functional diversity 70 the primary data are species traits which are trans- lated to pairwise distances among species and then + ∆ to clustering trees of species traits. The argument 60 for using trees is that in this way a single deviant species will have a small influence, since its differ- ence is evaluated only once instead of evaluating its distance to all other species (Petchey and Gaston, 50 2006).