Learn R Programming

LaMa (version 2.0.3)

dirichlet: Dirichlet distribution

Description

Density of the Dirichlet distribution.

Usage

ddirichlet(x, alpha, log = TRUE)

Value

ddirichlet gives the density.

Arguments

x

vector or matrix of quantiles

alpha

vector or matrix of shape parameters

log

logical; if TRUE, densities \(p\) are returned as \(\log(p)\).

Details

This implementation of ddirichlet allows for automatic differentiation with RTMB.

Examples

Run this code
ddirichlet(c(0.2, 0.3, 0.5), c(1, 2, 3))

Run the code above in your browser using DataLab