
Last chance! 50% off unlimited learning
Sale ends in
rdirichlet(n, alpha)
ddirichlet(x, alpha)
ddirichlet
) matrix containing shape
parameters. ddirichlet
returns a vector containing the Dirichlet density for the
corresponding rows of x
.rdirichlet
returns a matrix with n
rows, each containing
a single Dirichlet random deviate.
dbeta
, rbeta
x <- rdirichlet(20, c(1,1,1) )
ddirichlet(x, c(1,1,1) )
Run the code above in your browser using DataLab