update_classes_wb {RprobitB}R Documentation

Weight-based update of latent classes

Description

This function updates the latent classes based on their class weights.

Usage

update_classes_wb(Cmax, epsmin, epsmax, distmin, s, b, Omega)

Arguments

Cmax

The maximum number of classes.

epsmin

The threshold weight (between 0 and 1) for removing a class.

epsmax

The threshold weight (between 0 and 1) for splitting a class.

distmin

The (non-negative) threshold difference in class means for joining two classes.

s

The vector of class weights of length C. Set to NA if P_r = 0. For identifiability, the vector must be non-ascending.

b

The matrix of class means as columns of dimension P_r x C. Set to NA if P_r = 0.

Omega

The matrix of class covariance matrices as columns of dimension P_r*P_r x C. Set to NA if P_r = 0.

Details

The updating scheme bases on the following rules:

Value

A list of updated values for s, b, and Omega.

Examples

### parameter settings
s <- c(0.8,0.2)
b <- matrix(c(1,1,1,-1), ncol=2)
Omega <- matrix(c(0.5,0.3,0.3,0.5,1,-0.1,-0.1,0.8), ncol=2)

### Remove class 2
RprobitB:::update_classes_wb(Cmax = 10, epsmin = 0.3, epsmax = 0.9, distmin = 1,
                             s = s, b = b, Omega = Omega)

### Split class 1
RprobitB:::update_classes_wb(Cmax = 10, epsmin = 0.1, epsmax = 0.7, distmin = 1,
                             s = s, b = b, Omega = Omega)

### Join classes
RprobitB:::update_classes_wb(Cmax = 10, epsmin = 0.1, epsmax = 0.9, distmin = 3,
                             s = s, b = b, Omega = Omega)

[Package RprobitB version 1.1.4 Index]