dirichletrnd | R Documentation |
Random generation for the Dirichlet distribution
dirichletrnd(a, n)
a |
numeric vector for the concentration parameters |
n |
number of observations |
dirichletrnd generates n
random observations from a Dirichlet distribution
Tim Benham, Qibin Duan, Dirk P. Kroese, Benoit Liquet
Kroese D.P., Taimre T., Botev Z.I. (2011), Handbook of Monte Carlo Methods, John Wiley & Sons.
## Generation from the Dirichlet distribution
## with parameter a=(1,2,3,4,5)
set.seed(12345)
a <- 1:5
n <- 10
y <- dirichletrnd(a,n)
y
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.