The Dirichlet Distribution
Density function and random generation from the Dirichlet distribution.
ddirichlet(x, alpha) rdirichlet(n, alpha)
A vector containing a single deviate or matrix containing one random deviate per row.
Number of random vectors to generate.
Vector of shape parameters, or matrix of shape parameters corresponding to the number of draw.
The Dirichlet distribution is the multidimensional generalization of the beta distribution.
ddirichlet gives the density.
rdirichlet returns a
n rows, each containing a single Dirichlet random
Code is taken from Greg's Miscellaneous Functions (gregmisc). His code was based on code posted by Ben Bolker to R-News on 15 Dec 2000.
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.