1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108
|
\name{mclustModel}
\alias{mclustModel}
\title{
Best model based on BIC
}
\description{
Determines the best model from clustering via \code{mclustBIC}
for a given set of model parameterizations and numbers of components.
}
\usage{
mclustModel(data, BICvalues, G, modelNames, \dots)
}
\arguments{
\item{data}{
The matrix or vector of observations used to generate `object'.
}
\item{BICvalues}{
An \code{'mclustBIC'} object,
which is the result of applying \code{mclustBIC}
to \code{data}.
}
\item{G}{
A vector of integers giving the numbers of mixture components (clusters)
from which the best model according to BIC will be selected
(\code{as.character(G)} must be a subset of the row names of
\code{BICvalues}).
The default is to select the best model for all numbers
of mixture components used to obtain \code{BICvalues}.
}
\item{modelNames}{
A vector of integers giving the model parameterizations
from which the best model according to BIC will be selected
(\code{as.character(model)} must be a subset of the column names of
\code{BICvalues}).
The default is to select the best model for parameterizations
used to obtain \code{BICvalues}.
}
\item{\dots}{
Not used. For generic/method consistency.
}
}
\value{
A list giving the optimal (according to BIC) parameters,
conditional probabilities \code{z}, and log-likelihood,
together with the associated classification and its uncertainty.
The details of the output components are as follows:
\item{modelName}{
A character string indicating the model. The help file for
\code{\link{mclustModelNames}} describes the available models.
}
\item{n}{
The number of observations in the data.
}
\item{d}{
The dimension of the data.
}
\item{G}{
The number of components in the Gaussian mixture model corresponding
to the optimal BIC.
}
\item{bic}{
The optimal BIC value.
}
\item{loglik}{
The log-likelihood corresponding to the optimal BIC.
}
\item{parameters}{
A list with the following components:
\describe{
\item{\code{pro}}{
A vector whose \emph{k}th component is the mixing proportion for
the \emph{k}th component of the mixture model.
If missing, equal proportions are assumed.
}
\item{\code{mean}}{
The mean for each component. If there is more than one component,
this is a matrix whose kth column is the mean of the \emph{k}th
component of the mixture model.
}
\item{\code{variance}}{
A list of variance parameters for the model.
The components of this list depend on the model
specification. See the help file for \code{\link{mclustVariance}}
for details.
}
\item{\code{Vinv}}{
The estimate of the reciprocal hypervolume of the data region
used in the computation when the input indicates the
addition of a noise component to the model.
}
}
}
\item{z}{
A matrix whose \emph{[i,k]}th entry is the probability that observation
\emph{i} in the test data belongs to the \emph{k}th class.
}
}
\seealso{
\code{\link{mclustBIC}}
}
\examples{
irisBIC <- mclustBIC(iris[,-5])
mclustModel(iris[,-5], irisBIC)
mclustModel(iris[,-5], irisBIC, G = 1:6, modelNames = c("VII", "VVI", "VVV"))
}
\keyword{cluster}
% docclass is function
|