Dirichlet random values simulation | R Documentation |
Dirichlet random values simulation.
rdiri(n, a)
n |
The sample size, a numerical value. |
a |
A numerical vector with the parameter values. |
The algorithm is straightforward, for each vector, independent gamma values are generated and then divided by their total sum.
A matrix with the simulated data.
Michail Tsagris.
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr and Giorgos Athineou <gioathineou@gmail.com>.
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.
diri.est, diri.nr, diri.contour, rgendiri
x <- rdiri( 100, c(5, 7, 1, 3, 10, 2, 4) )
diri.est(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.