rdirichlet: Random Number Generator for the Dirichlet Distribution

rdirichletR Documentation

Random Number Generator for the Dirichlet Distribution

Description

Generates cell probabilities from the Dirichlet distribution.

Usage

rdirichlet(n = 1, alpha)

Arguments

n

The number of observations.

alpha

The shape parameters of the Dirichlet distribution.

Value

A matrix of n rows and k columns, where n is the number of observations and k is the number of cells.

Author(s)

Kaifeng Lu, kaifenglu@gmail.com

Examples


rdirichlet(2, c(50, 20, 30))


drugDemand documentation built on May 29, 2024, 8:43 a.m.