Learn R Programming

MMDai (version 1.2.0)

kIdentifier: Identify the number of components k

Description

This function is used to find the suitable number of components k.

Usage

kIdentifier(data, d, T = 1000, alpha = 0.25)

Arguments

data

- data in matrix formation with n rows and p columns

d

- number of categories for each variable

T

- number of iterations in Gibbs sampler, default value is 1000. T should be an even number for 'burn-in'.

alpha

- hyperparameter that could be regarded as the pseudo-count of the number of samples in the new component

Value

k_est - posterior estimation of k

k_track - track of k in the iteration process