rlcDmc {lazy.stat}R Documentation

Random numbers from the Linear Combination of a Dirichlet Components

Description

Random numbers from the Linear Combination of a Dirichlet Components

Usage

rlcDmc(n, class, alpha)

Arguments

n

# of random numbers to be generated

class

A vector containing the numeric values of scored multinomial

alpha

parameter vector of the Dirichlet: length(alpha) >= 2.

Details

Beta( a, b ) is equal to Dirichlet( c(a, b) ).

Value

vector of length n

Examples

x <- rlcDmc( 10000, 1:5, c(0.1, 0.2, 0.2, 0.4, 0.1) )
Print( mean(x), var(x), sqrt(var(x)) )


[Package lazy.stat version 0.1.3 Index]