MatTransMix (version 0.1.6)

MatTrans.EM: EM algorithm for matrix clustering

Description

Runs the EM algorithm for matrix clustering

Usage

MatTrans.EM(Y, initial = NULL, la = NULL, nu = NULL, 
model = NULL, trans = "Gaussian", la.type = 0, tol = 1e-05, 
max.iter = 1000, size.control = 0, silent = TRUE)

Arguments

Y

dataset of random matrices (p x T x n), n random matrices of dimensionality (p x T)

initial

initialization parameters provided by function MatTrans.init()

la

initial skewness for rows (K x p)

nu

initial skewness for columns (K x T)

model

parsimonious model type, if null, then all 196 models are run

trans

transformation method: Gaussian, Power, Manly

la.type

lambda type 0 or 1, 0: unrestricted, 1: same lambda across all variables

tol

tolerance level

max.iter

maximum number of iterations

size.control

minimum size of clusters allowed for controlling spurious solutions

silent

whether to produce output of steps or not

Value

result

parsimonious models

model

model types

loglik

log likelihood values

bic

bic values

best.result

best parsimonious model

best.model

best model type

best.loglik

best logliklihood

best.bic

best bic

Details

Runs the EM algorithm for modeling and clustering matrices for a provided dataset. Both matrix Gaussian mixture, matrix Power mixture and matrix Manly transformation mixture can be employed. The user should use the MatTrans.init() function to get initial parameters and input them as 'initial'. In the case when transformation parameters are not provided but 'trans' is specified to be 'Power' or 'Manly', 'la' and 'nu' take value of 0.5. 'model' can be specified as 'X-XXX-XX'. The first digit 'X' stands for the mean structure. It is either 'G': general mean or 'A': additive mean. The second 'XXX' specifies the variance-covariance Sigma. There are 14 options including EII, VII, EEI, VEI, EVI, VVI, EEE, EVE, VEE, VVE, EEV, VEV, EVV and VVV with detailed explanation as follows: "EII" spherical, equal volume "VII" spherical, unequal volume "EEI" diagonal, equal volume and shape "VEI" diagonal, varying volume, equal shape "EVI" diagonal, equal volume, varying shape "VVI" diagonal, varying volume and shape "EEE" ellipsoidal, equal volume, shape, and orientation "EVE" ellipsoidal, equal volume and orientation (*) "VEE" ellipsoidal, equal shape and orientation (*) "VVE" ellipsoidal, equal orientation (*) "EEV" ellipsoidal, equal volume and equal shape "VEV" ellipsoidal, equal shape "EVV" ellipsoidal, equal volume (*) "VVV" ellipsoidal, varying volume, shape, and orientation The last 2-digit 'XX' specifies the variance-covariance Psi. There are 7 options including II, EI, VI, EE, VE, EV, VV. The user can specify the 'model' to be for example 'X-VVV-EV', then both 'G' and 'A' mean structures will be fitted while Sigma and Psi are fixed at 'VVV' and 'EV', respectively. Similarly, 'model' can be specified as 'G-XXX-EV' or 'G-VVV-XX' for selection of Sigma and Psi structures.

Examples

Run this code
# NOT RUN {
set.seed(123)

data(crime)


Y <- crime$Y[c(2,7),,] / 1000

p <- dim(Y)[1]
T <- dim(Y)[2]
n <- dim(Y)[3]
K <-  2

init <- MatTrans.init(Y, K = K, n.start = 3)
Gauss <- MatTrans.EM(Y, initial = init, max.iter = 1000, model = "G-EII-UI")

# }

Run the code above in your browser using DataLab