R: Dirichlet RNG

rdir {maptpx} | R Documentation

## Dirichlet RNG

### Description

Generate random draws from a Dirichlet distribution

### Usage

    rdir(n, alpha)

### Arguments

`n` | The number of observations.
`alpha` | A `vector` of scale parameters, such that E[p_j] = α_j/∑_iα_i.

### Value

An `n` column matrix containing the observations.

### Author(s)

Matt Taddy mataddy@gmail.com

### Examples

    rdir(3,rep(1,6))

[Package maptpx version 1.9-7 Index]