rdirichlet: Simulate from Dirichlet distribution

View source: R/dirmult.R

rdirichletR Documentation

Simulate from Dirichlet distribution

Description

Simulates from a Dirichlet distribution

Usage

rdirichlet(n=1, alpha)

Arguments

n

The number of samples.

alpha

The shape parameters, need to be positive.

Value

Return an n x length(alpha) matrix where each row is drawn from a Dirichlet.

See Also

dirmult

Examples

  rdirichlet(n=100, alpha=rep(1,10))

dirmult documentation built on March 21, 2022, 5:05 p.m.

Related to rdirichlet in dirmult...