Learn R Programming

mdir (version 0.9.0)

sampleStickBreakingPrior: Sample stick breaking prior

Description

Draw weights from the stick-breaking prior.

Usage

sampleStickBreakingPrior(alpha, K)

Value

A vector of weights.

Arguments

alpha

The concentration parameter.

K

The number of weights to generate.

Examples

Run this code
weights <- stickBreakingPrior(1, 50)

Run the code above in your browser using DataLab