Learn R Programming

mixSPE (version 0.1.1)

mpe: Function for model-based clustering with the multivariate power exponential (PE) distribution.

Description

For fitting of a family of 16 mixture models based on mixtures of multivariate skew power exponential distributions with eigen-decomposed covariance structures.

Usage

mpe(verbose = FALSE, dat = NULL, seedno = 1, G = 1:4, start = "kmeans", kmeansinit = 10,
eps = 0.005, maxit = 5000, label = NULL, modelnames = c("EIIE", "VIIE", "EEIE", "VVIE",
"EEEE", "EEVE", "VVEE", "VVVE", "EIIV", "VIIV", "EEIV", "VVIV", "EEEV", "EEVV", "VVEV",
"VVVV"))

Arguments

verbose

A short progress indicator.

dat

A matrix such that rows correspond to observations and columns correspond to variables.

seedno

Seed number for initialization of k-means or random starts.

G

A sequence of integers corresponding to the number of components to be fitted.

start

Inputting "kmeans" initializes the component labels for each observation from a k-means classification. Option "random" results in a random hard initialization for the component label for each observation.

kmeansinit

Number of random starts to the k-means initialization function.

eps

Threshold for convergence for the GEM algorithm used in the Aitken's stopping criterion.

maxit

Maximum number of GEM iterations allowed.

label

Used for model-based classification aka semi-supervised classification.

modelnames

A total of 16 models are provided: "EIIE", "VIIE", "EEIE", "VVIE", "EEEE", "EEVE", "VVEE", "VVVE", "EIIV", "VIIV", "EEIV", "VVIV", "EEEV", "EEVV", "VVEV", "VVVV".

Value

call

Function call.

time

Time taken.

modelnames

Models fitted.

msc

Matrix of results with BIC, ICL, and log-likelihood values achieved for each model.

bicclassification

Maximum a posteriori component label indicators of each observation from the model selected by the BIC.

iclclassification

Maximum a posteriori component label indicators of each observation from the model selected by the ICL.

bicselection

Model selected by the BIC including estimates.

iclselection

Model selected by the ICL including estimates.

zlist

List of initial labels for each observation from the initialization function for each number of components.

Details

The component scale matrix is decomposed using an eigen-decomposition: \(\Sigma_g\) = \(\lambda_g\) \(\Gamma_g\) \(\Delta_g\) \(\Gamma'_g\) The nomenclature is as follows: a EEVE model denotes a model with equal constants associated with the eigenvalues (\(\lambda\)) for each group, equal orthogonal matrix of eigenvectors (\(\Gamma\)), variable diagonal matrices with values proportional to the eigenvalues of each component scale matrix (\(\Delta_g\)), and equal shape parameter (\(\beta\)).

See Also

See Also mspe.

Examples

Run this code
# NOT RUN {
set.seed(1)
Nobs1 <- 200
Nobs2 <- 250
X1 <- rpe(n = Nobs1, mean = c(0,0), scale = diag(2), beta = 1)
X2 <- rpe(n = Nobs2, mean = c(3,0), scale = diag(2), beta = 2)
x <- as.matrix(rbind(X1, X2))
membership <- c(rep(1, Nobs1), rep(2, Nobs2))
mperun <- mpe(verbose = TRUE, dat = x, seedno = 1, G = 1:2, start="kmeans",
               modelnames = c("EIIV", "EEEV", "VVVV"))
print(mperun)
print(table(membership,mperun$bicclassification))
# }

Run the code above in your browser using DataLab