preseqR.ztnb.em {preseqR} | R Documentation |
preseqR.ztnb.em
fits a zero-truncated negative binomial (ZTNB)
distribution to the initial sample.
Since the species with zero observations are missed in the sample, an
EM algorithm is used to estimate the parameters assuming the number of
individuals for each species follows a Negative Binomial distribution
with the zero counts as a missing latent data.
preseqR.ztnb.em(n, size = SIZE.INIT, mu = MU.INIT)
n |
A two-column matrix.
The first column is the frequency |
size |
A positive double setting the initial value of the parameter |
mu |
A positive double setting the initial value of the parameter |
See the supplement of Daley and Smith (2013).
size |
The estimate of the parameter |
mu |
The estimate of the parameter |
loglik |
Log-likelihood under estimated ZTNB. |
Chao Deng
## load library
library(preseqR)
## import data
data(FisherButterfly)
## print the parameters of a fitting negative binomial distribution
preseqR.ztnb.em(FisherButterfly)