Learn R Programming

Compositional (version 1.0)

diri.nr: Fiiting a Dirichlet distribution via Newton-Rapshon

Description

Fiiting a Dirichlet distribution via Newton-Rapshon.

Usage

diri.nr(x)

Arguments

x
A matrix containing the compositional data.

Value

  • A list including:
  • loglikThe value of the log-likelihood.
  • paramThe estimated parameters.

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 esimtation is much faster than "diri.est" when the sample size and or the dimensions increase.

References

Thomas P. Minka (2003). Estimating a Dirichlet distribution. http://research.microsoft.com/en-us/um/people/minka/papers/dirichlet/minka-dirichlet.pdf

See Also

diri.est, diri.contour rdiri

Examples

Run this code
x = rdiri( 100, c(5, 7, 1, 3, 10, 2, 4) )
diri.nr(x)
diri.est(x)

Run the code above in your browser using DataLab