Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

simulate_DP

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


MIRES

Measurement Invariance Assessment Using Random Effects Models and Shrinkage

v0.1.0
MIT + file LICENSE
Authors
Stephen Martin [aut, cre] (<https://orcid.org/0000-0001-8085-2390>), Philippe Rast [aut] (<https://orcid.org/0000-0003-3630-6629>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.