Description Usage Arguments Value Examples
View source: R/draw.dirichlet.R
This function implements pseudo-random number generation for a multivariate beta (Dirichlet) distribution with pdf
f(x|α_{1},...,α_{d})=\frac{Γ(∑_{j=1}^{d}α_{j})}{∏_{j=1}^{d}Γ(α_{j})} ∏_{j=1}^{d}x_{j}^{α_{j}-1}
for α_{j}>0, x_{j}≥q 0, and ∑_{j=1}^{d}x_{j}=1, where α_{1},...,α_{d} are the shape parameters and β is a common scale paramter.
1 | draw.dirichlet(no.row,d,alpha,beta)
|
no.row |
Number of rows to generate. |
d |
Number of variables to generate. |
alpha |
Vector of shape parameters. |
beta |
Scale parameter common to d variables. |
A no.row \times d matrix of generated data.
1 2 3 | |
[1] -1.852098e-04 9.293519e-05 -1.725680e-04 2.648426e-04
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.