Description Usage Arguments Value Author(s) See Also Examples
pdf and random deviates of the Dirichlet distribution.
1 2 | rdirichlet(n, alpha, allowZero=FALSE)
ddirichlet(x, alpha)
|
alpha |
The Dirichlet parameters. |
n |
number of observations |
x |
vector of quantiles. For |
allowZero |
Indicator that zeros are allowed in the alpha vector and should be handled appropriately |
ddirichlet gives the density and rdirichlet generates random deviates.
Rob Carnell
1 2 3 4 | rdirichlet(10, c(4,3,2))
ddirichlet(c(.2, .7, .1), c(4, 3, 2))
rdirichlet(5, c(4,3,0,2), allowZero=TRUE)
(ddirichlet(c(-0.2, 1.2), c(2,2)) == 0)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.