之前也介绍过几个计算多样性的包,包括vegan,iNEXT,fossil等。见
物种数量及多样性的外推
SpadeR是2016年发表的较新的R包,汇集了几乎所有常见的多样性计算和估计的方法,计算基于个体(丰度)数据或基于采样单元(发生率)数据的各种生物多样性指数和相关相似性指标。 里面有很多对原始方法的改进值得注意。如仅chao2就补充了Chao2-bc和ichao2两种更新的改进方法。
安装
1install.packages("SpadeR") 2library(SpadeR)包含6个主要函数
1.ChaoSpecies,估计群落物种多样性 1data(ChaoSpeciesData) 2ChaoSpecies(ChaoSpeciesData$Abu,"abundance",k=10,conf=0.95) 3#k为稀有物种的丰度阈值,用于计算ACE和ICE。conf为置信区间。 4#结果包括三部分。(1)是基本信息,(2)为各种多样性指标,(3)为各种指标的说明。 5(1) BASIC DATA INFORMATION: 6 7 Variable Value 8 Sample size n 1996 9 Number of observed species D 25 10 Coverage estimate for entire dataset C 0.998 11 CV for entire dataset CV 1.916 12 Cut-off point k 10 13 14 Variable Value 15 Number of observed individuals for rare group n_rare 53 16 Number of observed species for rare group D_rare 11 17 Estimate of the sample coverage for rare group C_rare 0.943 18 Estimate of CV for rare group in ACE CV_rare 0.629 19 Estimate of CV1 for rare group in ACE-1 CV1_rare 0.74 20 Number of observed individuals for abundant group n_abun 1943 21 Number of observed species for abundant group D_abun 14 22 23NULL 24 25 26(2) SPECIES RICHNESS ESTIMATORS TABLE: 27 28 Estimate s.e. 95%Lower 95%Upper 29 Homogeneous Model 25.660 0.954 25.082 30.295 30 Homogeneous (MLE) 25.000 0.975 25.000 28.500 31 Chao1 (Chao, 1984) 27.249 3.394 25.266 44.030 32 Chao1-bc 25.999 1.817 25.094 35.673 33 iChao1 (Chiu et al. 2014) 27.249 3.394 25.266 44.030 34 ACE (Chao & Lee, 1992) 26.920 2.367 25.292 37.639 35 ACE-1 (Chao & Lee, 1992) 27.399 3.163 25.336 42.153 36 1st order jackknife 27.998 2.449 25.739 37.171 37 2nd order jackknife 28.998 4.240 25.730 46.915 38 39 40(3) DESCRIPTION OF ESTIMATORS/MODELS: 41 42Homogeneous Model: This model assumes that all species have the same incidence or detection probabilities. See Eq. (3.2) of Lee and Chao (1994) or Eq. (12a) in Chao and Chiu (2016b). 43 44Chao2 (Chao, 1987): This approach uses the frequencies of uniques and duplicates to estimate the number of undetected species; see Chao (1987) or Eq. (11a) in Chao and Chiu (2016b). 45 46Chao2-bc: A bias-corrected form for the Chao2 estimator; see Chao (2005). 47 48iChao2: An improved Chao2 estimator; see Chiu et al. (2014). 49 50ICE (Incidence-based Coverage Estimator): A non-parametric estimator originally proposed by Lee and Chao (1994) in the context of capture-recapture data analysis. The observed species are separated as frequent and infrequent species groups;>in the infrequent group are used to estimate the number of undetected species. The estimated CV for species in the infrequent group characterizes the degree of heterogeneity among species incidence probabilities. See Eq. (12b) of Chao and Chiu (2016b), which is an improved version of Eq. (3.18) in Lee and Chao (1994). This model is also called Model(h) in capture-recapture literature where h denotes "heterogeneity". 51 52ICE-1: A modified ICE for highly-heterogeneous cases. 53 541st order jackknife: It uses the frequency of uniques to estimate the number of undetected species; see Burnham and Overton (1978). 55 562nd order jackknife: It uses the frequencies of uniques and duplicates to estimate the number of undetected species; see Burnham and Overton (1978). 57 5895% Confidence interval: A log-transformation is used for all estimators so that the lower bound of the resulting interval is at least the number of observed species. See Chao (1987).2.Diversity,计算richness, Shannon diversity and Simpson diversity 1data(DiversityData) 2Diversity(DiversityData$Abu,"abundance",q=c(0,0.5,1,1.5,2)) 3#q为多样性阶数 4#结果分5部分 5(1) BASIC DATA INFORMATION: 6 Variable Value 7 Sample size n 557 8 Number of observed species D 69 9 Estimated sample coverage C 0.957 10 Estimated CV CV 2.237 11 12(2) ESTIMATION OF SPECIES RICHNESS (DIVERSITY OF ORDER 0): 13 14 Estimate s.e. 95%Lower 95%Upper 15 Chao1 (Chao, 1984) 104.9 20.3 81.8 169.9 16 Chao1-bc 99.6 16.9 80.1 153.2 17 iChao1 113.9 12.7 95.1 146.4 18 ACE (Chao & Lee, 1992) 92.1 10.2 79.1 121.8 19 ACE-1 (Chao & Lee, 1992) 100.4 15.7 81.4 148.1 20 21 Descriptions of richness estimators (See Species Part) 22 23(3a) SHANNON ENTROPY: 24 25 Estimate s.e. 95%Lower 95%Upper 26 MLE 3.193 0.065 3.067 3.320 27 Jackknife 3.280 0.070 3.143 3.417 28 Chao & Shen 3.308 0.071 3.168 3.447 29 Chao et al. (2013) 3.293 0.072 3.152 3.433 30 31 MLE: empirical or observed entropy. 32 Jackknife: see Zahl (1977). 33 Chao & Shen: based>2003). 34 see Chao and Shen (2003). 35 Chao et al. (2013): A nearly optimal estimator of Shannon entropy; see Chao et al. (2013). 36 Estimated standard error is computed based>37 38(3b) SHANNON DIVERSITY (EXPONENTIAL OF SHANNON ENTROPY): 39 40 Estimate s.e. 95%Lower 95%Upper 41 MLE 24.372 1.539 21.355 27.388 42 Jackknife 26.573 1.805 23.035 30.111 43 Chao & Shen 27.320 1.895 23.606 31.034 44 Chao et al. (2013) 26.917 1.870 23.251 30.583 45 46(4a) SIMPSON CONCENTRATION INDEX: 47 48 Estimate s.e. 95%Lower 95%Upper 49 MVUE 0.08328 0.00714 0.06929 0.09728 50 MLE 0.08493 0.00713 0.07096 0.09890 51 52 MVUE: minimum variance unbiased estimator; see Eq. (2.27) of Magurran (1988). 53 MLE: maximum likelihood estimator or empirical index; see Eq. (2.26) of Magurran (1988). 54 55(4b) SIMPSON DIVERSITY (INVERSE OF SIMPSON CONCENTRATION): 56 57 Estimate s.e. 95%Lower 95%Upper 58 MVUE 12.00729 0.96804 10.10992 13.90465 59 MLE 11.77460 0.92959 9.95262 13.59659 60 61(5) CHAO AND JOST (2015) ESTIMATES OF HILL NUMBERS 62 63 q ChaoJost 95%Lower 95%Upper Empirical 95%Lower 95%Upper 64 1 0.0 104.935 7.476 202.394 69.000 61.625 76.375 65 2 0.5 53.093 38.499 67.687 41.565 37.267 45.863 66 3 1.0 26.917 23.475 30.359 24.372 21.420 27.324 67 4 1.5 16.411 13.936 18.886 15.806 13.481 18.131 68 5 2.0 12.007 10.006 14.008 11.775 9.854 13.696 69 70 ChaoJost: diversity profile estimator derived by Chao and Jost (2015). 71 Empirical: maximum likelihood estimator (observed index).3.ChaoShared,计算两群落共有的物种1data(ChaoSharedData) 2ChaoShared(ChaoSharedData$Abu,"abundance",se=TRUE,nboot=200,conf=0.95) 3#结果太多不放了4.SimilartyPair,计算两群落的相似性指数1data(SimilarityPairData) 2SimilarityPair(SimilarityPairData$Abu,"abundance",nboot=200) 3#结果也很丰富,包括了除Jaccard and Sorensen以外其他多种指标5.SimilarityMult,计算多个群落的相似性指数6.Genetics,计算基因数据的等位基因不相似性感兴趣可以自己试用一下~
END
---来自腾讯云社区的---生物信息知识分享
微信扫一扫打赏
支付宝扫一扫打赏