dirichletrnd function

Dirichlet generator

Dirichlet generator

Random generation for the Dirichlet distribution

dirichletrnd(a, n)

Arguments

  • a: numeric vector for the concentration parameters
  • n: number of observations

Returns

dirichletrnd generates n random observations from a Dirichlet distribution

Author(s)

Tim Benham, Qibin Duan, Dirk P. Kroese, Benoit Liquet

References

Kroese D.P., Taimre T., Botev Z.I. (2011), Handbook of Monte Carlo Methods, John Wiley & Sons.

Examples

## Generation from the Dirichlet distribution ## with parameter a=(1,2,3,4,5) set.seed(12345) a <- 1:5 n <- 10 y <- dirichletrnd(a,n) y
  • Maintainer: Benoit Liquet
  • License: GPL (>= 2.0)
  • Last published: 2023-10-04

Useful links