dir: Dirichlet distribution

rdirR Documentation

Dirichlet distribution

Description

Dirichlet distribution

Title

Usage

rdir(n, k)

ddir(x, k, log = FALSE)

Arguments

n

number of observations to draw from the Dirichlet distribution

k

vector of parameters

x

matrix n*m of n (rows) simplices of dimension m (columns)

log

logical indicating whether log density should be returned instead. Default FALSE

Value

returns a matrix of samples from the Dirichlet distribution with number of rows n for rdir() or a vector or densities for ddir()

Examples

k <- c(3.14, 10.6, 2.24, 8.67)
rdir(20, k)
x <- rdir(5, k)
ddir(x, k)

dmi3kno/qpd documentation built on Sept. 29, 2024, 6:39 p.m.