Generalised Dirichlet random values simulation {Compositional}R Documentation

Generalised Dirichlet random values simulation

Description

Generalised Dirichlet random values simulation.

Usage

rgendiri(n, a, b)

Arguments

n

The sample size, a numerical value.

a

A numerical vector with the shape parameter values of the Gamma distribution.

b

A numerical vector with the scale parameter values of the Gamma distribution.

Details

The algorithm is straightforward, for each vector, independent gamma values are generated and then divided by their total sum. The difference with rdiri is that here the Gamma distributed variables are not equally scaled.

Value

A matrix with the simulated data.

Author(s)

Michail Tsagris.

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.

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

rdiri, diri.est, diri.nr, diri.contour

Examples

a <- c(1, 2, 3)
b <- c(2, 3, 4)
x <- rgendiri(100, a, b)

[Package Compositional version 6.9 Index]