Title: | Number of Newly Discovered Rare Species Estimation |
---|---|
Description: | A Bayesian-weighted estimator and two unweighted estimators are developed to estimate the number of newly found rare species in additional ecological samples. Among these methods, the Bayesian-weighted estimator and an unweighted (Chao-derived) estimator are of high accuracy and recommended for practical applications. Technical details of the proposed estimators have been well described in the following paper: Shen TJ, Chen YH (2018) A Bayesian weighted approach to predicting the number of newly discovered rare species. Conservation Biology, In press. |
Authors: | Youhua Chen,Tsung-Jen Shen |
Maintainer: | Youhua Chen <[email protected]> |
License: | GPL-3 |
Version: | 1.3 |
Built: | 2025-02-14 03:40:03 UTC |
Source: | https://github.com/cran/RSE |
RSE: an R package for predicting numbers of rare species newly discoverd in additional ecological samples
RSE is an R package for estimating the number of new rare species in additional ecological samples. The methods used here include a Bayesian-weighted estimator and two unweighted estimators.
Youhua Chen (Chengdu Institute of Biology, Chinese Academy of Sciences);
Tsung-Jen Shen (Institute of Statistics & Department of Applied Mathematics, National Chung Hsing University)
Maintainer:
Youhua Chen <[email protected]>
Shen TJ, Chen YH (2018) Predicting the number of newly discovered rare species: a Bayesian weight approach. Conservation Biology, In press.
########################### #for abundance-based data type data(HerpetologicalData) ## two columns represent two samples of species abundance data X.merge = HerpetologicalData ## the first column is treated as the original sample X.col1 = X.merge[,1] ## the second column is treated as the additional sample X.col2 = X.merge[,2] Xi = X.col1 ## the number of individuals of the additional sample m = sum(X.col2) print(Pred.abundance.rare(boot.rep = 100, f=NULL, xi=Xi, m = m, k.show = 3)) ########################### #for incidence-based data type data(CanadaMite) ## two columns represent two samples of incidence counts X.merge = CanadaMite ## the first column is treated as the original sample X.col1 = X.merge[,1] ## the number of quadrats in the first sample nT = 16 ## the number of quadrats in the additional sample (i.e., the second column) u = 16 print(Pred.incidence.rare(boot.rep = 100, Q=NULL, xi=X.col1, nT=nT, u=u, k.show = 3))
########################### #for abundance-based data type data(HerpetologicalData) ## two columns represent two samples of species abundance data X.merge = HerpetologicalData ## the first column is treated as the original sample X.col1 = X.merge[,1] ## the second column is treated as the additional sample X.col2 = X.merge[,2] Xi = X.col1 ## the number of individuals of the additional sample m = sum(X.col2) print(Pred.abundance.rare(boot.rep = 100, f=NULL, xi=Xi, m = m, k.show = 3)) ########################### #for incidence-based data type data(CanadaMite) ## two columns represent two samples of incidence counts X.merge = CanadaMite ## the first column is treated as the original sample X.col1 = X.merge[,1] ## the number of quadrats in the first sample nT = 16 ## the number of quadrats in the additional sample (i.e., the second column) u = 16 print(Pred.incidence.rare(boot.rep = 100, Q=NULL, xi=X.col1, nT=nT, u=u, k.show = 3))
Given an abundance-based data, a bootstrap sample is generated from a reconstructed bootstrap assemblage.
boot.abundance.fun(S.hat, f, b)
boot.abundance.fun(S.hat, f, b)
S.hat |
An estimate of species richness. |
f |
A vector of species frequency counts, i.e., the number of singleton species (only one individual observed in the sample), the number of doubleton species (two individuals observed in the sample), and so forth. |
b |
A vector of estimates of two parameters for obtaining the estimated relative abundances of observed species in a given sample by Chao et al.'s (2015) method. |
The generated bootstrap sample is a vector of species frequency counts, i.e., the number of singleton species (only one individual observed in the bootstrap sample), the number of doubleton species (two individuals observed in the bootstrap sample), and so forth.
Youhua Chen & Tsung-Jen Shen
Chao A, Hsieh T, Chazdon R, Colwell R, Gotelli N. 2015. Unveiling the species-rank abundance distribution by generalizing the Good-Turing sample coverage theory. Ecology 96:1189-1201.
## As an example, Herpetological assemblage data are used here. data(HerpetologicalData) ## two columns represent two samples of species abundance data X.merge = HerpetologicalData ## the first column is treated as the original sample Xi = X.merge[,1] ## Convert species abundance data to species frequency counts data f = X.to.f(Xi) b = DetAbu(x=Xi, zero=FALSE) ## the estimated number of species S.hat = SpEst.Chao1.abun(f) boot.abundance.fun(S.hat=S.hat, f=f, b=b)
## As an example, Herpetological assemblage data are used here. data(HerpetologicalData) ## two columns represent two samples of species abundance data X.merge = HerpetologicalData ## the first column is treated as the original sample Xi = X.merge[,1] ## Convert species abundance data to species frequency counts data f = X.to.f(Xi) b = DetAbu(x=Xi, zero=FALSE) ## the estimated number of species S.hat = SpEst.Chao1.abun(f) boot.abundance.fun(S.hat=S.hat, f=f, b=b)
Given an incidence-based data, a bootstrap sample is generated from a reconstructed bootstrap assemblage.
boot.incidence.fun(S.hat, nT, Q, b)
boot.incidence.fun(S.hat, nT, Q, b)
S.hat |
An estimate of species richness. |
nT |
The number of quadrats of the original sample |
Q |
A vector of species frequency counts, i.e., the number of species dectected once (in only one quadrat), the number of species dectected twice (in exactly two quadrats), and so forth. |
b |
A vector of estimates of two parameters for obtaining the estimated detection probabilities of observed species in a given sample by Chao et al.'s (2015) method. |
The generated bootstrap sample is a vector of species frequency counts, i.e., the number of species dectected once (in only one quadrat of the bootstrap sample), the number of species dectected twice (in exactly two quadrats of the bootstrap sample), and so forth.
Youhua Chen & Tsung-Jen Shen
Chao A, Hsieh T, Chazdon R, Colwell R, Gotelli N. 2015. Unveiling the species-rank abundance distribution by generalizing the Good-Turing sample coverage theory. Ecology 96:1189-1201.
## As an example, Canadian-mite data are used here. data(CanadaMite) ## two columns represent two samples of incidence counts X.merge = CanadaMite ## the first column is treated as the sample X.col1 = X.merge[,1] Xi = X.col1 ## Convert species incidence count data to frequency counts data Q = X.to.f(Xi) ## the number of quadrats in the first sample nT = 16 b = DetInc(Xi, nT) boot.incidence.fun(S.hat=sum(Q)+b[3], nT=nT, Q=Q, b=b[1:2])
## As an example, Canadian-mite data are used here. data(CanadaMite) ## two columns represent two samples of incidence counts X.merge = CanadaMite ## the first column is treated as the sample X.col1 = X.merge[,1] Xi = X.col1 ## Convert species incidence count data to frequency counts data Q = X.to.f(Xi) ## the number of quadrats in the first sample nT = 16 b = DetInc(Xi, nT) boot.incidence.fun(S.hat=sum(Q)+b[3], nT=nT, Q=Q, b=b[1:2])
The mite data were collected by Youhua Chen (Chen et al. 2015) in western coasts of Canada. In Chen et al. (2015), 16 moss sampling locations were surveyed from the early days to the midst of June 2011, while another 16 moss sampling units were surveyed from the midst of June to the early days of July 2011.
Therefore, for the dataset, it has two columns, the first column contained the incidence or occurrence information of mites collected by first days of sampling (the early days to the midst of June 2011), while the second column contained the incidence of mites that were collected by the last days of the sampling
data(CanadaMite)
data(CanadaMite)
Youhua Chen & Tsung-Jen Shen
Chen Y, Amundrud SL, Srivastava DS (2015) Spatial variance in soil microarthropod communities: Niche, neutrality, or stochasticity? Ecoscience 21:1-14.
Chen Y, Shen TJ (2019) How many rare species in a total in additional ecological samples? In preparation.
Shen TJ, Chen YH (2018) A Bayesian weighted approach to predicting the number of newly discovered rare species. Conservation Biology, In press.
data(CanadaMite) ## two columns represent two samples of species incidence data X.merge = CanadaMite head(X.merge)
data(CanadaMite) ## two columns represent two samples of species incidence data X.merge = CanadaMite head(X.merge)
The estimation of parameters for obtaining the estimation of relative abundances of observed species
DetAbu(x, zero = FALSE)
DetAbu(x, zero = FALSE)
x |
A vector of species abundance data, i.e., the number of individuals of species 1, the number of individuals of species 2, and so forth. |
zero |
A logical value for whether reserving zero frequency or not. |
A vector of 3 elements: the first two values are the estimates of two parameters in Chao et al. (2015) for jointly estimating relative abundances of observed species and the third one is the estimated number of unseen species in the sample by Chao 1 estimator (Chao, 1984).
This function is a part of the original R code JADE by Chao et al. (2015) and is slightly modified for the output format.
Youhua Chen & Tsung-Jen Shen
Chao A, Hsieh T, Chazdon R, Colwell R, Gotelli N. 2015. Unveiling the species-rank abundance distribution by generalizing the Good-Turing sample coverage theory. Ecology 96:1189-1201.
Chao A. 1984. Non-parametric estimation of the number of classes in a population. Scandinavian Journal of Statistics 11:265-270.
R code for JADE: http://chao.stat.nthu.edu.tw/wordpress/paper/107_Rcode.txt
## As an example, Herpetological assemblage data are used here. data(HerpetologicalData) ## two columns represent two samples of species abundance data X.merge = HerpetologicalData ## the first column is treated as the original sample Xi = X.merge[,1] DetAbu(x=Xi)
## As an example, Herpetological assemblage data are used here. data(HerpetologicalData) ## two columns represent two samples of species abundance data X.merge = HerpetologicalData ## the first column is treated as the original sample Xi = X.merge[,1] DetAbu(x=Xi)
The estimation of parameters for obtaining the estimation of detection probabilites of observed species
DetInc(y, nT, zero = FALSE)
DetInc(y, nT, zero = FALSE)
y |
A vector of species incidence counts, i.e., the number of quadrats with species 1, the number of quadrats with species 2, and so forth. |
nT |
The number of quadrats of the original sample |
zero |
A logical value for whether reserving zero frequency or not. |
A vector of 3 elements: the first two values are the estimates of two parameters in Chao et al. (2015) for jointly estimating detection probabilities of observed species and the third one is the estimated number of unseen species in the sample by Chao 2 estimator (Chao, 1987).
This function is a part of the original R code JADE by Chao et al. (2015) and is slightly modified for the output format.
Youhua Chen & Tsung-Jen Shen
Chao A, Hsieh T, Chazdon R, Colwell R, Gotelli N. 2015. Unveiling the species-rank abundance distribution by generalizing the Good-Turing sample coverage theory. Ecology 96:1189-1201. Chao A. 1987. Estimating the population size for capture-recapture data with unequal catchability. Biometrics 43:783-791. R code for JADE: http://chao.stat.nthu.edu.tw/wordpress/paper/107_Rcode.txt
## As an example, Canadian-mite data are used here. data(CanadaMite) ## two columns represent two samples of incidence counts X.merge = CanadaMite ## the first column is treated as the original sample X.col1 = X.merge[,1] Xi = X.col1 ## the number of quadrats in the first sample nT = 16 DetInc(y = Xi, nT = nT)
## As an example, Canadian-mite data are used here. data(CanadaMite) ## two columns represent two samples of incidence counts X.merge = CanadaMite ## the first column is treated as the original sample X.col1 = X.merge[,1] Xi = X.col1 ## the number of quadrats in the first sample nT = 16 DetInc(y = Xi, nT = nT)
This function is to convert species frequency counts data to species abundance data.
f.to.X(f)
f.to.X(f)
f |
Species frequency counts data. |
Species abundance data is returned.
Youhua Chen & Tsung-Jen Shen
## The sample is composed of 5 singletons, two doubletons, and one tripleton species. f = c(5, 2, 1) f.to.X(f)
## The sample is composed of 5 singletons, two doubletons, and one tripleton species. f = c(5, 2, 1) f.to.X(f)
Suazo-Ortuno et al. (2008) studied how the conversion of tropical forest to agricultural mosaic influenced herpetofaunal distribution and community structure in conserved and human disturbed forest areas of neotropical Mexico.
Therefore, the dataset used here, the first and second columns represented species abundance in the conserved and disturbed areas, respectively.
data(HerpetologicalData)
data(HerpetologicalData)
Youhua Chen & Tsung-Jen Shen
Suazo-Ortuno I, Alvarado-Diaz J, Martines-Ramos M (2008) Effects of conversion of dry tropical forest to agricultural mosaic on herpetofaunal assemblages. Conservation Biology 22: 362-374.
Chen Y, Shen TJ (2019) How many rare species in a total in additional ecological samples? In preparation.
Shen TJ, Chen YH (2018) A Bayesian weighted approach to predicting the number of newly discovered rare species. Conservation Biology, In press.
data(HerpetologicalData) ## two columns represent two samples of species abundance data X.merge = HerpetologicalData head(X.merge)
data(HerpetologicalData) ## two columns represent two samples of species abundance data X.merge = HerpetologicalData head(X.merge)
Abundance-based prediction on the number of new rare species using a Bayesian-weight and two unweighted estimators along with their bootstrap standard errors and 95% bootstrap confidence intervals.
Pred.abundance.rare(boot.rep = 100, f = NULL, xi = NULL, m, k.show = 3)
Pred.abundance.rare(boot.rep = 100, f = NULL, xi = NULL, m, k.show = 3)
boot.rep |
Replicate number of the bootstrapping procedure |
f |
A vector of species frequency counts, i.e., the number of singleton species (only one individual observed in the sample), the number of doubleton species (two individuals observed in the sample), and so forth. |
xi |
A vector of species abundance data, i.e., the number of individuals of species 1, the number of individuals of species 2, and so forth. |
m |
The number of individuals of an additional sample |
k.show |
Display the estimating result of the numbers of extremely rare species with abundance <= k.show in the additional sample |
Estimating results including point estimate, bootstrap standard error, and 95 % bootstrap confidence interval for each of three methods (a Bayesian-weight and two unweighted estimators)
Youhua Chen & Tsung-Jen Shen
Shen TJ, Chen YH (2018) A Bayesian weighted approach to predicting the number of newly discovered rare species. Conservation Biology, In press.
## As an example, Herpetological assemblage data are used here. data(HerpetologicalData) ## two columns represent two samples of species abundance data X.merge = HerpetologicalData ## the first column is treated as the original sample X.col1 = X.merge[,1] ## the second column is treated as the additional sample X.col2 = X.merge[,2] Xi = X.col1 ## Convert species abundance data to species frequency counts data f = X.to.f(Xi) ## the number of individuals of the additional sample m = sum(X.col2) Pred.abundance.rare(f=f, m=m)
## As an example, Herpetological assemblage data are used here. data(HerpetologicalData) ## two columns represent two samples of species abundance data X.merge = HerpetologicalData ## the first column is treated as the original sample X.col1 = X.merge[,1] ## the second column is treated as the additional sample X.col2 = X.merge[,2] Xi = X.col1 ## Convert species abundance data to species frequency counts data f = X.to.f(Xi) ## the number of individuals of the additional sample m = sum(X.col2) Pred.abundance.rare(f=f, m=m)
Bayesian-weight estimator for predicting the number of new rare species using abundance data as inputs
Pred.Fk.BW(f, m, b, k.show = 3)
Pred.Fk.BW(f, m, b, k.show = 3)
f |
A vector of species frequency counts, i.e., the number of singleton species (only one individual observed in the sample), the number of doubleton species (two individuals observed in the sample), and so forth. |
m |
The number of individuals of an additional sample |
b |
A vector of two estimated parameters for obtaining the estimated relative species abundances by Chao et al.'s (2015) method. |
k.show |
Display the estimating result of the numbers of extremely rare species with abundance <= k.show in the additional sample |
The numbers of new rare species with abundance <= k.show are estimated by the abundance-based Bayesian-weight estimator and returned.
Youhua Chen & Tsung-Jen Shen
Shen TJ, Chen YH (2018) A Bayesian weighted approach to predicting the number of newly discovered rare species. Conservation Biology, In press.
## As an example, Herpetological assemblage data are used here. data(HerpetologicalData) ## two columns represent two samples of species abundance data X.merge = HerpetologicalData ## the first column is treated as the original sample X.col1 = X.merge[,1] ## the second column is treated as the additional sample X.col2 = X.merge[,2] Xi = X.col1 ## Convert species abundance data to species frequency counts data f = X.to.f(Xi) ## the number of individuals of the additional sample m = sum(X.col2) b = DetAbu(x=Xi, zero=FALSE) Pred.Fk.BW(f=f, m=m, b=b)
## As an example, Herpetological assemblage data are used here. data(HerpetologicalData) ## two columns represent two samples of species abundance data X.merge = HerpetologicalData ## the first column is treated as the original sample X.col1 = X.merge[,1] ## the second column is treated as the additional sample X.col2 = X.merge[,2] Xi = X.col1 ## Convert species abundance data to species frequency counts data f = X.to.f(Xi) ## the number of individuals of the additional sample m = sum(X.col2) b = DetAbu(x=Xi, zero=FALSE) Pred.Fk.BW(f=f, m=m, b=b)
Abundance-based unweighted naive estimator for predicting the number of new rare species
Pred.Fk.Naive(f, m, k.show = 3)
Pred.Fk.Naive(f, m, k.show = 3)
f |
A vector of species frequency counts, i.e., the number of singleton species (only one individual observed in the sample), the number of doubleton species (two individuals observed in the sample), and so forth. |
m |
The number of individuals of an additional sample |
k.show |
Display the estimating result of the numbers of extremely rare species with abundance <= k.show in the additional sample. |
The numbers of new rare species with abundance <= k.show are estimated by the abundance-based unweighted naive estimator and returned.
Youhua Chen & Tsung-Jen Shen
Shen TJ, Chen YH (2018) A Bayesian weighted approach to predicting the number of newly discovered rare species. Conservation Biology, In press.
## As an example, Herpetological assemblage data are used here. data(HerpetologicalData) ## two columns represent two samples of species abundance data X.merge = HerpetologicalData ## the first column is treated as the original sample X.col1 = X.merge[,1] ## the second column is treated as the additional sample X.col2 = X.merge[,2] Xi = X.col1 ## Convert species abundance data to species frequency counts data f = X.to.f(Xi) ## the number of individuals of the additional sample m = sum(X.col2) Pred.Fk.Naive(f=f, m=m)
## As an example, Herpetological assemblage data are used here. data(HerpetologicalData) ## two columns represent two samples of species abundance data X.merge = HerpetologicalData ## the first column is treated as the original sample X.col1 = X.merge[,1] ## the second column is treated as the additional sample X.col2 = X.merge[,2] Xi = X.col1 ## Convert species abundance data to species frequency counts data f = X.to.f(Xi) ## the number of individuals of the additional sample m = sum(X.col2) Pred.Fk.Naive(f=f, m=m)
Unweighted estimator based on Chao et al. (2015)'s paper using abundance-based data for predicting the number of new rare species in an additional ecological sample
Pred.Fk.unweighted(f, m, b, f0, k.show = 3)
Pred.Fk.unweighted(f, m, b, f0, k.show = 3)
f |
A vector of species frequency counts, i.e., the number of singleton species (only one individual observed in the sample), the number of doubleton species (two individuals observed in the sample), and so forth. |
m |
The number of individuals of an additional sample |
b |
A vector of two estimated parameters for obtaining the estimated relative species abundances by Chao et al.'s (2015) method. |
f0 |
The estimated number of unseen species in the original sample by Chao 1 estimator (Chao 1984) |
k.show |
Display the estimating result of the numbers of extremely rare species with abundance <= k.show in the additional sample |
The numbers of new rare species with abundance <= k.show are estimated by the abundance-based unweighted estimator and returned.
Youhua Chen & Tsung-Jen Shen
Chao A, Hsieh T, Chazdon R, Colwell R, Gotelli N. 2015. Unveiling the species-rank abundance distribution by generalizing the Good-Turing sample coverage theory. Ecology 96:1189-1201.
Chao A. 1984. Non-parametric estimation of the number of classes in a population. Scandinavian Journal of Statistics 11:265-270.
Shen TJ, Chen YH (2018) A Bayesian weighted approach to predicting the number of newly discovered rare species. Conservation Biology, In press.
## As an example, Herpetological assemblage data are used here. data(HerpetologicalData) ## two columns represent two samples of species abundance data X.merge = HerpetologicalData ## the first column is treated as the original sample X.col1 = X.merge[,1] ## the second column is treated as the additional sample X.col2 = X.merge[,2] Xi = X.col1 ## Convert species abundance data to species frequency counts data f = X.to.f(Xi) ## the number of individuals of the additional sample m = sum(X.col2) b = DetAbu(x=Xi, zero=FALSE) ## the estimated number of unseen species in the original sample f0 = SpEst.Chao1.abun(f)-sum(f) Pred.Fk.unweighted(f=f, m=m, b=b, f0=f0)
## As an example, Herpetological assemblage data are used here. data(HerpetologicalData) ## two columns represent two samples of species abundance data X.merge = HerpetologicalData ## the first column is treated as the original sample X.col1 = X.merge[,1] ## the second column is treated as the additional sample X.col2 = X.merge[,2] Xi = X.col1 ## Convert species abundance data to species frequency counts data f = X.to.f(Xi) ## the number of individuals of the additional sample m = sum(X.col2) b = DetAbu(x=Xi, zero=FALSE) ## the estimated number of unseen species in the original sample f0 = SpEst.Chao1.abun(f)-sum(f) Pred.Fk.unweighted(f=f, m=m, b=b, f0=f0)
Incidence-based prediction on the number of new rare species using a Bayesian-weight and two unweighted estimators along with their bootstrap standard errors and 95% bootstrap confidence intervals.
Pred.incidence.rare(boot.rep = 100, Q = NULL, xi = NULL, nT, u, k.show = 3)
Pred.incidence.rare(boot.rep = 100, Q = NULL, xi = NULL, nT, u, k.show = 3)
boot.rep |
Replicate number of the bootstrapping procedure |
Q |
A vector of species frequency counts, i.e., the number of species dectected once (in only one quadrat), the number of species dectected twice (in exactly two quadrats), and so forth. |
xi |
A vector of species incidence counts, i.e., the number of quadrats with species 1, the number of quadrats with species 2, and so forth. |
nT |
The number of quadrats of the original sample |
u |
The number of quadrats of an additional sample |
k.show |
Display the estimating results of the numbers of new rare species detected in the number of quadrats <= k.show in the additional sample |
Estimating results including point estimate, bootstrap standard error, and 95 % bootstrap confidence interval for each of three methods (a Bayesian-weight and two unweighted estimators)
Youhua Chen & Tsung-Jen Shen
Shen TJ, Chen YH (2018) A Bayesian weighted approach to predicting the number of newly discovered rare species. Conservation Biology, In press.
## As an example, Canadian-mite data are used here. data(CanadaMite) ## two columns represent two samples of incidence counts X.merge = CanadaMite ## the first column is treated as the original sample X.col1 = X.merge[,1] Xi = X.col1 ## Convert species incidence count data to frequency counts data Q = X.to.f(Xi) ## the number of quadrats in the first sample nT = 16 ## the number of quadrats in the additional sample (i.e., the second column) u = 16 Pred.incidence.rare(Q=Q, nT=nT, u=u)
## As an example, Canadian-mite data are used here. data(CanadaMite) ## two columns represent two samples of incidence counts X.merge = CanadaMite ## the first column is treated as the original sample X.col1 = X.merge[,1] Xi = X.col1 ## Convert species incidence count data to frequency counts data Q = X.to.f(Xi) ## the number of quadrats in the first sample nT = 16 ## the number of quadrats in the additional sample (i.e., the second column) u = 16 Pred.incidence.rare(Q=Q, nT=nT, u=u)
Bayesian-weight estimator for predicting the number of new rare species using incidence/quadrat data
Pred.Qk.BW(Q, nT, u, b, k.show = 3)
Pred.Qk.BW(Q, nT, u, b, k.show = 3)
Q |
A vector of species frequency counts, i.e., the number of species dectected once (in only one quadrat), the number of species dectected twice (in exactly two quadrats), and so forth. |
nT |
The number of quadrats of the original sample |
u |
The number of quadrats of an additional sample |
b |
A vector of two estimated parameters for obtaining the estimated relative species abundances by Chao et al.'s (2015) method. |
k.show |
Display the estimating results of the numbers of new rare species detected in the number of quadrats <= k.show in the additional sample |
The numbers of new rare species detected in the number of quadrats <= k.show are estimated by the incidence-based Bayesian-weight estimator and returned.
Youhua Chen & Tsung-Jen Shen
Shen TJ, Chen YH (2018) A Bayesian weighted approach to predicting the number of newly discovered rare species. Conservation Biology, In press.
## As an example, Canadian-mite data are used here. data(CanadaMite) ## two columns represent two samples of incidence counts X.merge = CanadaMite ## the first column is treated as the original sample X.col1 = X.merge[,1] Xi = X.col1 ## Convert species incidence count data to frequency counts data Q = X.to.f(Xi) ## the number of quadrats in the first sample nT = 16 ## the number of quadrats in the additional sample (i.e., the second column) u = 16 b = DetInc(y=Xi, nT=nT) Pred.Qk.BW(Q=Q, nT=nT, u=u, b=b[1:2])
## As an example, Canadian-mite data are used here. data(CanadaMite) ## two columns represent two samples of incidence counts X.merge = CanadaMite ## the first column is treated as the original sample X.col1 = X.merge[,1] Xi = X.col1 ## Convert species incidence count data to frequency counts data Q = X.to.f(Xi) ## the number of quadrats in the first sample nT = 16 ## the number of quadrats in the additional sample (i.e., the second column) u = 16 b = DetInc(y=Xi, nT=nT) Pred.Qk.BW(Q=Q, nT=nT, u=u, b=b[1:2])
Incidence-based unweighted naive estimator for predicting the number of new rare species
Pred.Qk.Naive(nT, u, f, k.show = 3)
Pred.Qk.Naive(nT, u, f, k.show = 3)
nT |
The number of quadrats of the original sample |
u |
The number of quadrats of an additional sample |
f |
A vector of species frequency counts, i.e., the number of species dectected once (in only one quadrat), the number of species dectected twice (in exactly two quadrats), and so forth. |
k.show |
Display the estimating results of the numbers of new rare species detected in the number of quadrats <= k.show in the additional sample. |
The numbers of new rare species detected in the number of quadrats <= k.show are estimated by the incidence-based unweighted naive estimator and returned.
Youhua Chen & Tsung-Jen Shen
Shen TJ, Chen YH (2018) A Bayesian weighted approach to predicting the number of newly discovered rare species. Conservation Biology, In press.
## As an example, Canadian-mite data are used here. data(CanadaMite) ## two columns represent two samples of incidence counts X.merge = CanadaMite ## the first column is treated as the original sample X.col1 = X.merge[,1] Xi = X.col1 ## Convert species incidence count data to frequency counts data Q = X.to.f(Xi) ## the number of quadrats in the first sample nT = 16 ## the number of quadrats in the additional sample (i.e., the second column) u = 16 Pred.Qk.Naive(nT=nT,u=u,f=Q)
## As an example, Canadian-mite data are used here. data(CanadaMite) ## two columns represent two samples of incidence counts X.merge = CanadaMite ## the first column is treated as the original sample X.col1 = X.merge[,1] Xi = X.col1 ## Convert species incidence count data to frequency counts data Q = X.to.f(Xi) ## the number of quadrats in the first sample nT = 16 ## the number of quadrats in the additional sample (i.e., the second column) u = 16 Pred.Qk.Naive(nT=nT,u=u,f=Q)
Unweighted Estimator derived from Chao et al. (2015)'s paper using incidence/quadrat data for predicting the number of new rare species in an additional ecological sample
Pred.Qk.unweighted(Q, nT, u, b, Q0, k.show = 3)
Pred.Qk.unweighted(Q, nT, u, b, Q0, k.show = 3)
Q |
A vector of species frequency counts, i.e., the number of species dectected once (in only one quadrat), the number of species dectected twice (in exactly two quadrats), and so forth. |
nT |
The number of quadrats of the original sample |
u |
The number of quadrats of an additional sample |
b |
A vector of two estimated parameters for obtaining the estimated relative species abundances by Chao et al.'s (2015) method. |
Q0 |
The estimated number of unseen species in the original sample by Chao 2 estimator (Chao 1987) |
k.show |
Display the estimating results of the numbers of new rare species detected in the number of quadrats <= k.show in the additional sample |
The numbers of new rare species detected in the number of quadrats <= k.show are estimated by the incidence-based unweighted estimator derived from Chao et al. (2015)'s paper and returned.
Youhua Chen & Tsung-Jen Shen
Chao A, Hsieh T, Chazdon R, Colwell R, Gotelli N. 2015. Unveiling the species-rank abundance distribution by generalizing the Good-Turing sample coverage theory. Ecology 96:1189-1201.
Chao A. 1987. Estimating the population size for capture-recapture data with unequal catchability. Biometrics 43:783-791.
Shen TJ, Chen YH (2018) A Bayesian weighted approach to predicting the number of newly discovered rare species. Conservation Biology, In press.
## As an example, Canadian-mite data are used here. data(CanadaMite) ## two columns represent two samples of incidence counts X.merge = CanadaMite ## the first column is treated as the original sample X.col1 = X.merge[,1] Xi = X.col1 ## Convert species incidence count data to frequency counts data Q = X.to.f(Xi) ## the number of quadrats in the first sample nT = 16 ## the number of quadrats in the additional sample (i.e., the second column) u = 16 b = DetInc(Xi, nT) Pred.Qk.unweighted(Q=Q, nT=nT, u=u, b=b[1:2], Q0=b[3])
## As an example, Canadian-mite data are used here. data(CanadaMite) ## two columns represent two samples of incidence counts X.merge = CanadaMite ## the first column is treated as the original sample X.col1 = X.merge[,1] Xi = X.col1 ## Convert species incidence count data to frequency counts data Q = X.to.f(Xi) ## the number of quadrats in the first sample nT = 16 ## the number of quadrats in the additional sample (i.e., the second column) u = 16 b = DetInc(Xi, nT) Pred.Qk.unweighted(Q=Q, nT=nT, u=u, b=b[1:2], Q0=b[3])
Chao1 estimator of species richness
SpEst.Chao1.abun(f)
SpEst.Chao1.abun(f)
f |
A vector of species frequency counts, i.e., the number of singleton species (only one individual observed in the sample), the number of doubleton species (two individuals observed in the sample), and so forth. |
Youhua Chen & Tsung-Jen Shen
Chao A. 1984. Non-parameteric estimation of the number of classes in a population. Scandinavian Journal of Statistics 11:265-270
## As an example, Herpetological assemblage data are used here. data(HerpetologicalData) ## two columns represent two samples of species abundance data X.merge = HerpetologicalData ## the first column is treated as the original sample Xi = X.merge[,1] ## Convert species abundance data to species frequency counts data f = X.to.f(Xi) SpEst.Chao1.abun(f=f)
## As an example, Herpetological assemblage data are used here. data(HerpetologicalData) ## two columns represent two samples of species abundance data X.merge = HerpetologicalData ## the first column is treated as the original sample Xi = X.merge[,1] ## Convert species abundance data to species frequency counts data f = X.to.f(Xi) SpEst.Chao1.abun(f=f)
This function is to convert a vector of species abundance data to a vector of species frequency counts data.
X.to.f(X)
X.to.f(X)
X |
A vector of species abundance data. |
Species frequency counts is returned.
Youhua Chen & Tsung-Jen Shen
## As an example, Herpetological assemblage data are used here. data(HerpetologicalData) ## two columns represent two samples of species abundance data X.merge = HerpetologicalData ## the first column is treated as the original sample X.col1 = X.merge[,1] Xi = X.col1 ## convert species abundance data to species frequency counts data X.to.f(Xi)
## As an example, Herpetological assemblage data are used here. data(HerpetologicalData) ## two columns represent two samples of species abundance data X.merge = HerpetologicalData ## the first column is treated as the original sample X.col1 = X.merge[,1] Xi = X.col1 ## convert species abundance data to species frequency counts data X.to.f(Xi)