| ddirichlet {MCMCpack} | R Documentation |
Functions to compute the density of the Dirichlet distribution.
ddirichlet(x, alpha)
x |
A vector containing a single deviate or matrix containing one random deviate per row. |
alpha |
Vector of shape parameters, or matrix of shape parameters corresponding to each row above. |
The Dirichlet distribution is the multidimensional generalization of the beta distribution.
ddirichlet returns a vector containing the evaluated Dirichlet
density for the corresponding rows of x.
Code is taken from Greg's Miscellaneous Functions (gregmisc). His code was based on code posted by Ben Bolker to R-News on Fri Dec 15 2000.
ddirichlet(c(.1,.2,.7), c(1,1,1))