rdirichlet {BGSIMD}R Documentation

Random Sampling from the Dirichlet Distribution

Description

The function outputs a random sample from the Dirichlet distribution.

Usage

rdirichlet(n, alpha)

Arguments

n

Sample size

alpha

Parameter vector

Author(s)

Code is taken from Greg's Miscellaneous Functions (gregmisc). His code was based on code posted by Ben Bolker to R-News on 15 Dec 2000.

See Also

rbeta

Examples

x <- rdirichlet(10, c(1,2,3) )

[Package BGSIMD version 1.0 Index]