update_classes_wb function

Weight-based update of latent classes

Weight-based update of latent classes

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

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.

Returns

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

Details

The updating scheme bases on the following rules:

  • We remove class cc, if sc\<ϵmins_c\<\epsilon_{min}, i.e. if the class weight scs_c drops below some threshold ϵmin\epsilon_{min}. This case indicates that class cc has a negligible impact on the mixing distribution.
  • We split class cc into two classes c1c_1 and c2c_2, if scϵmaxs_c\>\epsilon_{max}. This case indicates that class cc has a high influence on the mixing distribution whose approximation can potentially be improved by increasing the resolution in directions of high variance. Therefore, the class means bc1b_{c_1} and bc2b_{c_2} of the new classes c1c_1 and c2c_2 are shifted in opposite directions from the class mean bcb_c of the old class cc in the direction of the highest variance.
  • We join two classes c1c_1 and c2c_2 to one class cc, if bc1bc2\<ϵdistmin||b_{c_1} - b_{c_2}||\<\epsilon_{distmin}, i.e. if the euclidean distance between the class means bc1b_{c_1} and bc2b_{c_2} drops below some threshold ϵdistmin\epsilon_{distmin}. This case indicates location redundancy which should be repealed. The parameters of cc are assigned by adding the values of ss from c1c_1 and c2c_2 and averaging the values for bb and Ω\Omega. The rules are executed in the above order, but only one rule per iteration and only if Cmax is not exceeded.

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)