rdirichlet {drugDemand} | R Documentation |
Random Number Generator for the Dirichlet Distribution
Description
Generates cell probabilities from the Dirichlet distribution.
Usage
rdirichlet(n = 1, alpha)
Arguments
n |
The number of observations. |
alpha |
The shape parameters of the Dirichlet distribution. |
Value
A matrix of n rows and k columns, where n is the number of observations and k is the number of cells.
Author(s)
Kaifeng Lu, kaifenglu@gmail.com
Examples
rdirichlet(2, c(50, 20, 30))
[Package drugDemand version 0.1.3 Index]