rdirichlet: Draw from Dirichlet distribution

Description Usage Arguments Value Examples

Description

This function draws samples from a dirichlet distriution with hyperpars m.

Usage

1
rdirichlet(par, m = 1)

Arguments

par

Vector of inputs (Alpha+ number of obs in each group)

m=1

number of vectors to generate

Value

Vector of probabilities, of same length as par. The values sum to 1.

Examples

1
2
rdirichlet(c(1,1,1))
rdirichlet(c(0.5,20,0.000000001))

zoevanhavre/ZDev documentation built on May 4, 2019, 11:24 p.m.