View source: R/Parameter_estimation_and_hypothesis_testing.R
MLEp | R Documentation |
\psi
Numerically searches for the MLE of \psi
given an abundance vector with a binary search algorithm.
MLEp(abund)
abund |
An abundance vector. |
Numerically searches for the MLE of \psi
as the root of equation
K=\sum_{i=1}^n\psi/(\psi+i-1),
where K
is the observed number of
different species in the sample. The right side of the equation is monotonically
increasing when \psi>0
, so a binary search is used to find the root.
An accepted \psi
sets value of the right side
of the equation within R's smallest possible value of the actual value of K
.
The MLE of \psi
.
W.J. Ewens, The sampling theory of selectively neutral alleles, Theoretical Population Biology, Volume 3, Issue 1, 1972, Pages 87-112, ISSN 0040-5809, <\Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/0040-5809(72)90035-4")}>.
##Find the MLE of psi of the vector (1,2,2).
##The frequencies of the frequencies of the data vector are given as input:
MLEp(abundance(c(1,2,2)))
##Find the MLE of psi of a sample from the Poisson-Dirichlet distribution:
set.seed(1000)
x<-rPD(n=10000, psi=100)
MLEp(abundance(x))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.