Learn R Programming

bayesm (version 3.1-6)

rdirichlet: Draw From Dirichlet Distribution

Description

rdirichlet draws from Dirichlet

Usage

rdirichlet(alpha)

Value

Vector of draws from Dirichlet

Arguments

alpha

vector of Dirichlet parms (must be > 0)

Warning

This routine is a utility routine that does not check the input arguments for proper dimensions and type.

Author

Peter Rossi, Anderson School, UCLA, perossichi@gmail.com.

References

For further discussion, see Chapter 2, Bayesian Statistics and Marketing by Rossi, Allenby, and McCulloch.

Examples

Run this code
set.seed(66)
rdirichlet(c(rep(3,5)))

Run the code above in your browser using DataLab