rdirichlet: Random generation for the Dirichlet distribution

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/rdirichlet.R

Description

Random generation from the Dirichlet distribution.

Usage

1
 rdirichlet( n = 10, alpha = c( 1, 1 ) ) 

Arguments

n

number of observations.

alpha

vector of shape parameters.

Details

The Dirichlet distribution is the multidimensional generalization of the beta distribution.

Value

A matrix with n rows, each containing a single Dirichlet random deviate.

Author(s)

Reza Mohammadi a.mohammadi@uva.nl

See Also

Beta

Examples

1
2
3
  draws = rdirichlet( n = 500, alpha = c( 1, 1, 1 ) )
  
  boxplot( draws )

Example output



bmixture documentation built on May 11, 2021, 5:08 p.m.