rdirichlet: Sample from a Dirichlet distribution

View source: R/utils.R

rdirichletR Documentation

Sample from a Dirichlet distribution

Description

Generate a random vector from the k-dimensional symmetric Dirichlet distribution with concentration parameter alpha

Usage

rdirichlet(k, alpha = 1)

Arguments

k

Length of the vector

alpha

Concentration parameters

Value

a numeric vector

Examples

qvals <- rdirichlet(16, 1)
sum(qvals)

causaloptim documentation built on Oct. 17, 2024, 9:08 a.m.