Learn R Programming

bayesm (version 1.1-2)

rdirichlet: Draw From Dirichlet Distribution

Description

rdirichlet draws from Dirichlet

Usage

rdirichlet(alpha)

Arguments

alpha
vector of Dirichlet parms (must be > 0)

Value

  • Vector of draws from Dirichlet

concept

  • dirichlet distribution
  • simulation

Warning

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

References

For further discussion, see Bayesian Statistics and Marketing by Allenby, McCulloch, and Rossi. http://gsbwww.uchicago.edu/fac/peter.rossi/research/bsm.html

Examples

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

Run the code above in your browser using DataLab