Learn R Programming

MCMCpack (version 0.4-5)

ddirichlet: 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.

Value

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

Details

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

See Also

Beta, rdirichlet

Examples

Run this code
ddirichlet(c(.1,.2,.7), c(1,1,1))

Run the code above in your browser using DataLab