rdirichlet {BGSIMD} | R Documentation |
The function outputs a random sample from the Dirichlet distribution.
rdirichlet(n, alpha)
n |
Sample size |
alpha |
Parameter vector |
Code is taken from Greg's Miscellaneous Functions (gregmisc). His code was based on code posted by Ben Bolker to R-News on 15 Dec 2000.
x <- rdirichlet(10, c(1,2,3) )