draw.dirichlet {MultiRNG} | R Documentation |
Pseudo-Random Number Generation under Multivariate Beta (Dirichlet) Distribution
Description
This function implements pseudo-random number generation for a multivariate beta (Dirichlet) distribution with pdf
for ,
, and
, where
are the shape parameters and
is a common scale paramter.
Usage
draw.dirichlet(no.row,d,alpha,beta)
Arguments
no.row |
Number of rows to generate. |
d |
Number of variables to generate. |
alpha |
Vector of shape parameters. |
beta |
Scale parameter common to |
Value
A matrix of generated data.
Examples
alpha.vec=c(1,3,4,4)
mydata=draw.dirichlet(no.row=1e5,d=4,alpha=alpha.vec,beta=2)
apply(mydata,2,mean)-alpha.vec/sum(alpha.vec)
[Package MultiRNG version 1.2.4 Index]