ztnb.rSAC
predicts the expected number of species represented at least
ztnb.rSAC(n, r=1, size=SIZE.INIT, mu=MU.INIT)
A two-column matrix.
The first column is the frequency
A positive integer. Default is 1.
A positive double, the initial value of the parameter size
in
the negative binomial distribution for the EM algorithm. Default value is 1.
A positive double, the initial value of the parameter mu
in the
negative binomial distribution for the EM algorithm. Default value is 0.5.
The estimator for the
The statistical assumption is that for each species the number of individuals
in a sample follows a Poisson distribution. The Poisson rate lambda
are numbers generated from a gamma distribution. So the random variable
X
, which is the number of species represented x (x > 0) times in the
sample, follows a zero-truncated negative binomial distribution. The
unknown parameters are estimated by the function preseqR.ztnb.em
based
on the initial sample. Using the estimated distribution, we calculate the
expected number of species represented at least r times in a random sample.
Details of the estimation procedure can be found in the supplement of
Daley T. and Smith AD. (2013).
Daley, T., & Smith, A. D. (2013). Predicting the molecular complexity of sequencing libraries. Nature methods, 10(4), 325-327.
Deng C, Daley T & Smith AD (2015). Applications of species accumulation curves in large-scale biological data analysis. Quantitative Biology, 3(3), 135-144.
# NOT RUN {
## load library
library(preseqR)
## import data
data(FisherButterfly)
## construct the estimator for SAC
ztnb1 <- ztnb.rSAC(FisherButterfly, r=1)
## The number of species represented at least once in a sample,
## when the sample size is 10 or 20 times of the initial sample
ztnb1(c(10, 20))
## construct the estimator for r-SAC
ztnb2 <- ztnb.rSAC(FisherButterfly, r=2)
## The number of species represented at least twice in a sample,
## when the sample size is 50 or 100 times of the initial sample
ztnb2(c(50, 100))
# }
Run the code above in your browser using DataLab