rdirichlet {bmixture} | R Documentation |
Random generation for the Dirichlet distribution
Description
Random generation from the Dirichlet distribution.
Usage
rdirichlet( n = 10, alpha = c( 1, 1 ) )
Arguments
n |
number of observations. |
alpha |
vector of shape parameters. |
Details
The Dirichlet distribution is the multidimensional generalization of the beta distribution.
Value
A matrix with n
rows, each containing a single Dirichlet random deviate.
Author(s)
Reza Mohammadi a.mohammadi@uva.nl
See Also
Examples
draws = rdirichlet( n = 500, alpha = c( 1, 1, 1 ) )
boxplot( draws )
[Package bmixture version 1.7 Index]