Rfast (version 1.7.3)

Fitting a Dirichlet distribution via Newton-Rapshon: Fitting a Dirichlet distribution via Newton-Rapshon

Description

Fitting a Dirichlet distribution via Newton-Rapshon.

Usage

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.

Value

A list including: A list including:

Details

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

See Also

beta.mle

Examples

Run this code
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) )

Run the code above in your browser using DataLab