MatrixMixt {MatrixMixtures} | R Documentation |
Fitting for Matrix-Variate Mixture Models
Description
Fits, by using expectation-maximization algorithms, mixtures of matrix-variate distributions (normal, t, contaminated normal) to the given data. Can be run in parallel. The Bayesian information criterion (BIC) is used to select the number of groups.
Usage
MatrixMixt(
X,
G = 1:3,
mod,
tol = 1e-05,
maxiter = 10000,
ncores = 1,
verbose = TRUE
)
Arguments
X |
A list of dimension |
G |
A vector containing the numbers of groups to be tried. |
mod |
The matrix-variate distribution to be used for the mixture model. Possible
values are: |
tol |
Threshold for Aitken's acceleration procedure. Default value is |
maxiter |
Maximum number of iterations of the algorithms. Default value is |
ncores |
A positive integer indicating the number of cores used for running in parallel.
Default value is |
verbose |
Logical indicating whether the running output should be displayed. |
Value
A list with the following elements:
flag |
Convergence flag (TRUE - success, FALSE - failure). |
pig |
Vector of the estimated mixing proportions (length G). |
nu |
Vector of the estimated degree of freedoms (length G). Only for "MVT". |
alpha |
Vector of the estimated inliers proportions (length G). Only for "MVCN". |
eta |
Vector of the estimated inflation parameters (length G). Only for "MVCN". |
M |
Array of the mean matrices (p x r x G). |
Sigma |
Array of the estimated row covariance matrices (p x p x G). |
Psi |
Array of the estimated column covariance matrices (r x r x G). |
class |
Vector of estimated data classification. |
z |
Matrix of estimated posterior probabilities (N x G). |
v |
Matrix of estimated inlier probabilities (N x G). Only for "MVCN". |
lik |
Estimated log-likelihood. |
BIC |
Estimated BIC. |
Examples
data(SimX)
res <- MatrixMixt(X = SimX, G = 2, mod = "MVCN")