rdirichlet {dirmult} | R Documentation |
Simulate from Dirichlet distribution
Description
Simulates from a Dirichlet distribution
Usage
rdirichlet(n=1, alpha)
Arguments
n |
The number of samples. |
alpha |
The shape parameters, need to be positive. |
Value
Return an n x length(alpha) matrix where each row is drawn from a Dirichlet.
See Also
Examples
rdirichlet(n=100, alpha=rep(1,10))
[Package dirmult version 0.1.3-5 Index]