rlcDmc {lazy.stat} | R Documentation |
Random numbers from the Linear Combination of a Dirichlet Components
rlcDmc(n, class, alpha)
n |
# of random numbers to be generated |
class |
A vector containing the numeric values of scored multinomial |
alpha |
parameter vector of the Dirichlet: length(alpha) >= 2. |
Beta( a, b ) is equal to Dirichlet( c(a, b) ).
vector of length n
x <- rlcDmc( 10000, 1:5, c(0.1, 0.2, 0.2, 0.4, 0.1) ) Print( mean(x), var(x), sqrt(var(x)) )