cmb.search | R Documentation |
Runs forward, backward, or stepwise variable selection procedure for obtaining the parsimonious conditional mixture models when all conditional orders are considered. Alternatively, runs the optimal order search algorithm, and parsimonious conditional mixture modeling for the obtained order.
cmb.search(x, l, K, method = "stepwise", all.perms = TRUE, id0 = NULL, n.em = 200, em.iter = 5, EM.iter = 200, nk.min = NULL, max.spur = 5, tol = 1e-06, silent = FALSE, Parallel = TRUE, n.cores = 4)
x |
dataset matrix (n x p) |
l |
order of polynomial regression model |
K |
number of clusters |
method |
variable selection method (options 'stepwise', 'forward', 'backward' and 'none') |
all.perms |
conditioning order search algorithm ( |
id0 |
initial group membership (length n) |
n.em |
number of short EM in emEM procedure |
em.iter |
maximum number of short EM iterations in emEM |
EM.iter |
maximum number of EM iterations |
nk.min |
spurious output control |
max.spur |
number of trials |
tol |
tolerance level |
silent |
output control |
Parallel |
Parallel computing |
n.cores |
number of cores in parallel computing |
Functions 'cmb.search' and 'cmb.em' have common arguments except 'all.perm'. With all.perms = TRUE
, a full search is applied to data, that is running parsimonious conditional mixture modeling for all orders and recognizing the optimal order based on the BIC. Then two lists are returned: best.model
stores the results for the conditional mixture model with the optimal order, and models
has results for all orders. With the option all.perms = FALSE
, the optimal conditional order search algorithm is applied, and then only the list best.model
is returned.
The list models
is returned when all.perms = TRUE
.
best.model |
membership assignments and estimated parameters of mixture model with the optimal contioning order.
|
models |
membership assignments and model parameters of mixture models with all conditioning orders.
|
cmb.em
set.seed(1) K = 3 l <- 2 x <- as.matrix(iris[,-5]) obj <- cmb.search(x = x, l, K, method = "stepwise", all.perms = FALSE, Parallel = FALSE, silent = FALSE) obj$best.model$BIC
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.