rdirichlet | R Documentation |
Randomly samples a vector of length n from a dirichlet distribution parameterized by a vector of alphas PDF of Gamma with scale = 1 : f(x)= 1/(Gamma(a)) x^(a-1) e^-(x)
rdirichlet(n, alphas_list)
n |
integer, the number of samples |
alphas_list |
Named List of Integers: parameters of the dirichlet, interpreted as the number of success of each outcome |
n x length(alphas) named tibble representing the probability of observing each outcome
rdirichlet(100, list(a = 20, b = 15, c = 60))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.