rdirichlet {phybase}R Documentation

Generate random numbers from the dirichlet distribution

Description

This function can generate random numbers from a dirichlet distribution.

Usage

rdirichlet(n,a)

Arguments

n the number of random numbers to be generated
a shape parameters of the dirichlet distribution

Value

The function returns random numbers from a dirichlet distribution.

Author(s)

Code is taken from Greg's Miscellaneous Functions (gregmisc). His code was based on code posted by Ben Bolker to R-News on Fri Dec 15 2000.

Examples

rdirichlet(1,c(3,3,3))

[Package phybase version 1.1 Index]