rdirichlet {bmixture} | R Documentation |
Random generation from the Dirichlet distribution.
rdirichlet( n = 10, alpha = c( 1, 1 ) )
n |
number of observations. |
alpha |
vector of shape parameters. |
The Dirichlet distribution is the multidimensional generalization of the beta distribution.
A matrix with n
rows, each containing a single Dirichlet random deviate.
Reza Mohammadi a.mohammadi@uva.nl
draws = rdirichlet( n = 500, alpha = c( 1, 1, 1 ) )
boxplot( draws )