Carries out model-based clustering and classification using the mixture of generalized hyperbolic factor analyzers.
MGHFA(data=NULL, gpar0=NULL, G=2, max.iter=100,
label =NULL ,q=2,eps=1e-2 , method="kmeans", scale=TRUE ,nr=10)
A matrix or data frame such that rows correspond to observations and columns correspond to variables.
(optional) A list containing the initial parameters of the mixture model. See the 'Details' section.
The range of values for the number of clusters.
(optional) A numerical parameter giving the maximum number of iterations each EM algorithm is allowed to use.
( optional) A n dimensional vector, if label[i]=k then observation i belongs to group k, If label[i]=0 then observation i has no known group, if NULL then the data has no known groups.
The range of values for the number of factors.
(optional) A number specifying the epsilon value for the convergence criteria used in the EM algorithms. For each algorithm, the criterion is based on the difference between the log-likelihood at an iteration and an asymptotic estimate of the log-likelihood at that iteration. This asymptotic estimate is based on the Aitken acceleration.
( optional) A string indicating the initialization criterion, if not specified kmeans clustering is used. Alternative methods are: hierarchical "hierarchical" and model based "modelBased" clustering
( optional) A logical value indicating whether or not the data should be scaled, true by default.
( optional) A number indicating the number of starting value when random is used, 10 by default.
A S4 object of class MixGHD with slots:
Bayesian information criterion value for each combination of G and q.
Bayesian information criterion.
A list of the model parameters.
The log-likelihood values.
A vector of integers indicating the maximum a posteriori classifications for the best model.
A matrix giving the raw values upon which map is based.
The arguments gpar0, if specified, is a list structure containing at least one p dimensional vector mu, alpha and phi, a pxp matrix gamma, a 2 dimensional vector cpl containing omega and lambda.
C.Tortora, P.D. McNicholas, and R.P. Browne (2016). Mixtures of Generalized Hyperbolic Factor Analyzers. Advanced in data analysis and classification 10(4) p.423-440.\ C. Tortora, R. P. Browne, A. ElSherbiny, B. C. Franczak, and P. D. McNicholas (2021). Model-Based Clustering, Classification, and Discriminant Analysis using the Generalized Hyperbolic Distribution: MixGHD R package, Journal of Statistical Software 98(3) 1--24, <doi:10.18637/jss.v098.i03>.
# NOT RUN {
## Classification
#70% belong to the training set
data(sonar)
label=sonar[,61]
set.seed(4)
a=round(runif(62)*207+1)
label[a]=0
##model estimation
model=MGHFA(data=sonar[,1:60], G=2, max.iter=25 ,q=2,label=label)
#result
table(model@map,sonar[,61])
summary(model)
# }
Run the code above in your browser using DataLab