Bt_prob_abu.Rd
Estimates true species frequencies (including unobserved species). The
estimated species frequencies are bootstrapped to generate CI for diversity
estimates following the method of Chao and Jost 2015 MEE. We modified the
source code from SpadeR
so that parameter names matched analogous use
elsewhere in the MeanRarity
package. This function is copied directly
fromSpadeR:::Chat.Ind()
from the R package SpadeR 0.1.1 by Anne Chao, K. H.
Ma, T. C. Hsieh and Chun-Huo Chiu.
Bt_prob_abu(ab)
A numeric vector of species abundances or relative abundances.
numeric vector of Estimated species frequencies
Chao A, Jost L (2015). “Estimating diversity and entropy profiles via discovery rates of new species.” Methods in Ecology and Evolution, 6(8), 873--882. ISSN 2041210X, doi:10.1111/2041-21 .
# a sample
ab <- c(1, 1, 1, 2, 2, 2, 3, 4, 5, 7, 9, 12, 13, 21, 25, 50)
# sample frequencies
freq <- (ab/sum(ab))
freq[order(freq, decreasing = TRUE)]
#> [1] 0.316455696 0.158227848 0.132911392 0.082278481 0.075949367 0.056962025
#> [7] 0.044303797 0.031645570 0.025316456 0.018987342 0.012658228 0.012658228
#> [13] 0.012658228 0.006329114 0.006329114 0.006329114
#estimated true frequencies
etf <- Bt_prob_abu(ab)
etf[order(etf , decreasing = TRUE)]
#> [1] 0.316455696 0.158227848 0.132911392 0.082278336 0.075948970 0.056954619
#> [7] 0.044256443 0.031375098 0.024710780 0.017724247 0.010332157 0.010332157
#> [13] 0.010332157 0.009374254 0.009374254 0.003137198 0.003137198 0.003137198
# adjustment evident from 4th species on, 2 new rare species added
sum(etf) #rel. abundances still sum to 1
#> [1] 1