ddirichlet {MCMCpack}R Documentation

Evaluate Density of Dirichlet Distribution

Description

Functions to compute the density of the Dirichlet distribution.

Usage

  ddirichlet(x, alpha)

Arguments

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.

Details

The Dirichlet distribution is the multidimensional generalization of the beta distribution.

Value

ddirichlet returns a vector containing the evaluated Dirichlet density for the corresponding rows of x.

Author(s)

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.

See Also

Beta, rdirichlet

Examples

  ddirichlet(c(.1,.2,.7), c(1,1,1))

[Package Contents]