ddir: Dirichlet density

Description Usage Arguments Value Author(s) Examples

Description

Evaluate the density of a Dirichlet distribution

Usage

1
ddir(x, q, logscale=TRUE)

Arguments

x

Vector or matrix containing the value at which to evaluate the density. If a matrix, the density is evaluated for each row. Rows are renormalized to ensure they add up to 1

q

Dirichlet parameters. Must have the same length as ncol(x), or length 1 (in which case a symmetric Dirichlet density is valuated)

logscale

For logscale==TRUE, dimom returns the natural log of the prior density

Value

Density of a Dirichlet(q) distribution evaluated at each row of x

Author(s)

David Rossell

Examples

1
2
3
library(mombf)
x= matrix(c(1/3,2/3,.5,.5),nrow=2,byrow=TRUE)
ddir(x,q=2)

mombf documentation built on Dec. 6, 2019, 3:01 a.m.