diri.est: Fitting a Dirichlet distribution

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/diri.est.R

Description

Estimation of the parameters of a fitted Dirichlet distribution.

Usage

1
diri.est(x, type = "mle")

Arguments

x

A matrix containing compositional data.

type

If you want to estimate the parameters use type="mle". If you want to estimate the mean vector along with the precision parameter, the second parametrisation of the Dirichlet, use type="prec".

Details

Maximum likelihood estimation of the parameters of a Dirichlet distribution is performed.

Value

A list including:

loglik

The value of the log-likelihood.

param

The estimated parameters.

phi

The estimated precision parameter, if type = "prec".

a

The estimated mean vector, if type = "prec".

runtime

The run time of the maximisation procedure.

Author(s)

Michail Tsagris

R implementation and documentation: Michail Tsagris <[email protected]> and Giorgos Athineou <[email protected]>

References

Ng Kai Wang, Guo-Liang Tian and Man-Lai Tang (2011). Dirichlet and related distributions: Theory, methods and applications. John Wiley \& Sons.

Aitchison J. (1986). The statistical analysis of compositional data. Chapman \& Hall.

See Also

diri.nr, diri.contour, rdiri, ddiri

Examples

1
2
3
x <- rdiri( 100, c(5, 7, 1, 3, 10, 2, 4) )
diri.est(x)
diri.est(x, type = "prec")

Example output

$loglik
[1] 1053.32

$param
[1]  5.3279151  6.9683480  0.9256242  3.2000572 10.5698852  2.1313562  4.2436429

$std
[1] 0.06866641 0.06694560 0.08706442 0.07289223 0.06487948 0.07714100 0.07039358

$runtime
   user  system elapsed 
  0.006   0.000   0.012 

$loglik
[1] 1053.32

$phi
[1] 33.36711

$a
[1] 0.15967701 0.20884064 0.02774076 0.09590528 0.31677842 0.06387642 0.12718146

$b
[1]  5.3279604  6.9684086  0.9256292  3.2000822 10.5699806  2.1313717  4.2436780

$runtime
   user  system elapsed 
  0.012   0.000   0.012 

Compositional documentation built on June 4, 2018, 5:04 p.m.