dirichlet: Dirichlet distribution

dirichletR Documentation

Dirichlet distribution

Description

Density of the Dirichlet distribution.

Usage

ddirichlet(x, alpha, log = TRUE)

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.

Value

ddirichlet gives the density.

Examples

ddirichlet(c(0.2, 0.3, 0.5), c(1, 2, 3))

LaMa documentation built on June 8, 2025, 1:53 p.m.