Fitting a Dirichlet distribution via Newton-Rapshon

Share:

Description

Fitting a Dirichlet distribution via Newton-Rapshon.

Usage

1
diri.nr2(x, tol = 1e-07)

Arguments

x

A matrix containing the compositional data. Zeros are not allowed.

tol

The tolerance level idicating no further increase in the log-likelihood.

Details

Maximum likelihood estimation of the parameters of a Dirichlet distribution is performed via Newton-Raphson. Initial values suggested by Minka (2003) are used.

Value

A list including:

loglik

The value of the log-likelihood.

param

The estimated parameters.

Author(s)

Michail Tsagris and Manos Papadakis

R implementation and documentation: Michail Tsagris <mtsagris@yahoo.gr> and Manos Papadakis <papadakm95@gmail.com>

See Also

beta.mle

Examples

1
2
3
x <- matrix( rgamma(100 * 4, c(5, 6, 7, 8), 1), ncol = 4)
x <- x / rowsums(x)
system.time( for(i in 1:1000) diri.nr2(x) )

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.