LearnBayes (version 2.15.1)

rdirichlet: Random draws from a Dirichlet distribution

Description

Simulates a sample from a Dirichlet distribution

Usage

rdirichlet(n,par)

Arguments

n

number of simulations required

par

vector of parameters of the Dirichlet distribution

Value

matrix of simulated draws where each row corresponds to a single draw

Examples

Run this code
# NOT RUN {
par=c(2,5,4,10)
n=10
rdirichlet(n,par)
# }

Run the code above in your browser using DataLab