powered by
Simulates a sample from a Dirichlet distribution
rdirichlet(n,par)
matrix of simulated draws where each row corresponds to a single draw
number of simulations required
vector of parameters of the Dirichlet distribution
Jim Albert
par=c(2,5,4,10) n=10 rdirichlet(n,par)
Run the code above in your browser using DataLab