rdirichlet {grizbayr} | R Documentation |
Random Dirichlet
Description
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)
Usage
rdirichlet(n, alphas_list)
Arguments
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 |
Value
n x length(alphas) named tibble representing the probability of observing each outcome
Examples
rdirichlet(100, list(a = 20, b = 15, c = 60))
[Package grizbayr version 1.3.5 Index]