Learn R Programming

SBMSplitMerge (version 1.1.1)

ddirichlet: Dirichlet distribution

Description

Density of Dirichlet distribution

Usage

ddirichlet(x, gam, log = FALSE)

Arguments

x

random variable in the d-dimensional simplex

gam

a length K concentration parameter

log

return the log-probability instead?

Value

the density

Examples

Run this code
# NOT RUN {
g <- rep(2,5)
p <- rdirichlet(1, g) ## a length-5 probability vector
ddirichlet(p, g)
# }

Run the code above in your browser using DataLab