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)The list models is returned when all.perms = TRUE.
membership assignments and estimated parameters of mixture model with the optimal contioning order.
the input dataset
estimated regression models for each cluster (K x p)
vector of estimated membership (length n)
estimated log likelihood
Bayesian Information Criterion
vector of estimated mixing proportions (length K)
matrix of estimated posterior probabilities (n x K)
matrix of estimated regression parameters (K x (p + p(p-1)l/2) )
matrix of estimated variances (K x p)
applied conditioning order (length p)
number of parameters
membership assignments and model parameters of mixture models with all conditioning orders.
list of estimated regression models for all clusters (K x p x p!)
p! vectors of estimated memberships (n x p!)
estimated log likelihood values (length p!)
Bayesian Information Criterion values (length p!)
p! vectors of estimated mixing proportions (K x p!)
p! matrices of estimated posterior probabilities (K x p!)
p! matrices of estimated regression parameters (K x (p + p(p-1)l/2) x p! )
p! matrices of estimated variances (K x p x p!)
appled conditioning orders (p! x p )
number of parameters in p! models (length p!)
dataset matrix (n x p)
order of polynomial regression model
number of clusters
variable selection method (options 'stepwise', 'forward', 'backward' and 'none')
conditioning order search algorithm (TRUE: full search; FALSE proposed search algorithm)
initial group membership (length n)
number of short EM in emEM procedure
maximum number of short EM iterations in emEM
maximum number of EM iterations
spurious output control
number of trials
tolerance level
output control
Parallel computing
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.
cmb.em
set.seed(1)
K = 3
l <- 2
x <- as.matrix(iris[,-5])
# \donttest{
obj <- cmb.search(x = x, l, K, method = "stepwise", all.perms = FALSE,
Parallel = FALSE, silent = FALSE)
obj$best.model$BIC
# }
Run the code above in your browser using DataLab