Model Initialization
LRMoE.cmm_init — Functioncmm_init(Y, X, n_comp, type; exact_Y = false, n_random = 5)Initialize an LRMoE model using the Clustered Method of Moments (CMM).
Arguments
Y: A matrix of response.X: A matrix of covariates.n_comp: Integer. Number of latent classes/components.type: A vector of eithercontinuous,discreteorreal, indicating the type of response by dimension.
Optional Arguments
exact_Y:trueorfalse(default), indicating ifYis observed exactly or with censoring and truncation.n_random: Integer. Number of randomized initializations.
Return Values
zero_y: Proportion of zeros in observedY.mean_y_pos: Mean of positive observations inY.var_y_pos: Variance of positive observations inY.skewness_y_pos: Skewness of positive observations inY.kurtosis_y_pos: Kurtosis of positive observations inY.α_init: Initialization of logit regression coefficientsα.params_init: Initializations of expert functions. It is a three-dimensional vector. For example,params_init[1][2]initializes the 1st dimension ofYusing the 2nd latent class, which is a vector of potential expert functions to choose from.ll_init: Calculates the loglikelihood of each expert function on the clustered groups ofY. For example,ll_init[1][2][3]is the loglikelihood of the 1st dimension ofY, calculated based on the 2nd latent classes and the 3rd initialized expert function inparams_init.ll_best: An initialization chosen fromparams_initwhich yields the highest likelihood upon initialization.random_init: A list ofn_randomrandomized initializations chosen fromparams_init.