Skip to contents

The Jacobian factor (prod_i x_i)^-1 runs over ALL D parts including the reference one; without it the density does not integrate to one over the simplex.

Usage

Lgtnpdf(x, mu, Sigma)

Arguments

x

A composition with D strictly positive parts.

mu

Mean of the alr coordinates, length D-1.

Sigma

Covariance of the alr coordinates, positive definite.

Value

List with density, log_density, alr, quadratic_form, log_jacobian, log_det, D.

Details

Formula: f(x) = (2 pi)^{-(D-1)/2} |Sigma|^{-1/2} (prod_{i=1}^{D} x_i)^{-1} exp( -1/2 (alr(x) - mu)' Sigma^{-1} (alr(x) - mu) )

References

Aitchison (1986), The Statistical Analysis of Compositional Data, Chapter 6. The reference part is the LAST, matching the sibling module aitalr.

Examples

Lgtnpdf(c(0.3, 0.3, 0.4), mu = c(0, 0), Sigma = diag(2))
#> $density
#> [1] 4.069818
#> 
#> $log_density
#> [1] 1.403598
#> 
#> $alr
#> [1] -0.2876821 -0.2876821
#> 
#> $quadratic_form
#> [1] 0.1655219
#> 
#> $log_jacobian
#> [1] 3.324236
#> 
#> $log_det
#> [1] 0
#> 
#> $D
#> [1] 3
#> 
#> $method
#> [1] "Additive logistic-normal density, Aitchison Chapter 6"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"