simulate_DP: Generate Truncated Dirichlet Process Mixture.

View source: R/density.R

simulate_DPR Documentation

Generate Truncated Dirichlet Process Mixture.

Description

Generate Truncated Dirichlet Process Mixture.

Usage

simulate_DP(N, K, param, alpha, f)

Arguments

N

Number of data points.

K

Max cluster.

param

Data.frame of parameters corresponding to d and r distribution functions. (E.g., data.frame(mean = rnorm(50), sd = abs(rnorm(50, 0, .5))))

alpha

Numeric. The alpha parameter to the DP.

f

Character. Root name of base or kernel function (e.g., "norm", "exp").

Value

List of data (y), weights (pi), params (param), and the true density function (d).

Author(s)

Stephen Martin


stephensrmmartin/MIRES documentation built on June 14, 2025, 4:27 p.m.