powered by
Random generation from the Dirichlet distribution.
rdirichlet( n = 10, alpha = c( 1, 1 ) )
number of observations.
vector of shape parameters.
A matrix with n rows, each containing a single Dirichlet random deviate.
n
The Dirichlet distribution is the multidimensional generalization of the beta distribution.
Beta
# NOT RUN { draws = rdirichlet( n = 500, alpha = c( 1, 1, 1 ) ) boxplot( draws ) # }
Run the code above in your browser using DataLab