estimMMM {MGMM} | R Documentation |
This function performs the model selection and the parameter inference.
estimMMM(x, gmax = NULL, nbBlocs = NULL, modellist = NULL, nbinit = 20, nbCPU = 1, criterion = "PenLike", pen = 0.5 * log(nrow(x)))
x |
data.frame. Observations to cluster (continuous variables must be "numeric" and categorical variables must be "factor"). |
gmax |
numeric. Maximum number of component (not used if modellist is specified). |
nbBlocs |
numeric. Number of blocs of variables (not used if modellist is specified). |
modellist |
matrix. Models to consider. The number of columns specifies the number of blocs. Each row corresponds to a model andx specifies the number of components per blocs. |
nbinit |
numeric. Number of random initializations. |
nbCPU |
numeric. Number of cores (not for windows). |
criterion |
character. Criterion used for model selection (must be "PenLike" or "MICL") |
pen |
numeric. Value of the penalty (only used if criterion="PenLike"). BIC corresponds to pen=0.5 * log(nrow(x)), AIC correponds to pen=1. |
List
# Sample data from 2 blocs of bivariate Gaussian mixture with two components # slot x: observation, slot z: partitions obs <- rMGMM() plot(obs$x, col=obs$z[,1]) plot(obs$x, col=obs$z[,2]) # Model selection with three components at the maximum, two blocks and BIC. res <- estimMMM(obs$x, 2, 2)