diri.nr: Fitting a Dirichlet distribution via Newton-Rapshon
Description
Fitting a Dirichlet distribution via Newton-Rapshon.
Usage
diri.nr(x)
Arguments
x
A matrix containing the compositional data.
Value
A list including:
iterThe number of iterations required.
loglikThe value of the log-likelihood.
paramThe estimated parameters.
runtimeThe run time of the procedure.
Details
Maximum likelihood estimation of the parameters of a Dirichlet distribution is performed via Newton-Raphson.
Initial values suggested by Minka (2003) are used. The estimatation is super faster than "diri.est" and the
difference becomes really apparent when the sample size and or the dimensions increase. In fact this will work with millions of observations.
So in general, I trust this one more than "diri.est".
The only problem I have seen with this method is that if the data are concentrated around a point,
say the center of the simplex, it will be hard for this and the previous methods to give estimates of the parameters.
In this extremely difficult scenario I would suggest the use of the previous function with the precision parametrisation
"diri.est(x, type = "prec")". It will be extremely fast and accurate.
References
Thomas P. Minka (2003). Estimating a Dirichlet distribution. http://research.microsoft.com/en-us/um/people/minka/papers/dirichlet/minka-dirichlet.pdf