Skip to contents

Draws the number of distinct species \(Y^{(n)}\) from the Dirichlet process prior with concentration parameter \(\alpha\) and sample size \(n\).

Usage

rDPspecies(alpha, size)

Arguments

alpha

Concentration parameter (positive scalar or vector).

size

Sample size \(n\) (positive integer, scalar or vector).

Value

An integer vector of simulated species counts.