Rdocumentation
powered by
Learn R Programming
textir (version 1.8-8)
rdir: Dirichlet RNG
Description
Generate random draws from a Dirichlet distribution
Usage
rdir(n, alpha)
Arguments
n
The number of observations.
alpha
A
vector
of scale parameters, such that $E[p_j] = \alpha_j/\sum_i\alpha_i$.
Value
An
n
column matrix containing the observations.
See Also
topics
Examples
Run this code
rdir(
3
,
rep
(
1
,
6
))
Run the code above in your browser using
DataLab