Learn R Programming

convdistr (version 1.6.1)

DIRICHLET: Factory for a DIRICHLET distribution object

Description

Returns an DIRICHLET distribution object that draw random numbers generated by the function rdirichlet

Usage

new_DIRICHLET(p_alpha, p_dimnames)

Value

An object of class DISTRIBUTION,

p_distribution$distribution, TRUNCATED

Arguments

p_alpha

k-value vector for concentration parameter. Must be positive

p_dimnames

A vector of characters for the names of the k-dimensions

Author

John J. Aponte

Details

A name can be provided for the dimensions. Otherwise rvar1, rvar2, ..., rvark will be assigned

Examples

Run this code
myDistr <- new_DIRICHLET(c(0.3,0.2,0.5), c("a","b","c"))
myDistr$rfunc(10)

Run the code above in your browser using DataLab