rdirichlet {nonparametric.bayes} | R Documentation |
Generate a sample from a Dirichlet distirbution Using: https://en.wikipedia.org/wiki/Dirichlet_distribution#Random_number_generation
Description
Generate a sample from a Dirichlet distirbution Using: https://en.wikipedia.org/wiki/Dirichlet_distribution#Random_number_generation
Usage
rdirichlet(n, alpha)
Arguments
n |
Number of observations. |
alpha |
A vector containing the parameters for the Dirichlet distribution. |
Value
A sample of n observations from the Dirichlet distribution.
Examples
rdirichlet(n=1, alpha=c(2, 2, 2))
[Package nonparametric.bayes version 0.0.1 Index]