\name{Dirichlet mixture model selection via BIC and ICL}
\alias{bic.mixdiri}
\title{
Dirichlet mixture model selection via BIC and ICL
}

\description{
Dirichlet mixture model selection via BIC and ICL.
}

\usage{
bic.mixdiri(x, G = 5, tol = 1e-4, graph = FALSE)
}

\arguments{
\item{x}{
A matrix containing compositional data, no zero values are allowed.
}
\item{G}{
The maximum number of clusters to be tested. Default value is 5.
}
\item{tol}{
The tolerance value to terminate the EM algorithm.
}
\item{graph}{
A boolean variable, TRUE or FALSE specifying whether a graph should be drawn or not.
}
}

\details{
The function computes the BIC and ICL to decide on the optimal number of clusters when
using Dirichlet mixtures.
}

\value{
A plot of the ICL values and a list including:
\item{bic}{
The BIC values for all the models tested.
}
\item{icl}{
The ICL values for all the models tested.
}
\item{runtime}{
The run time of the process.
}
}

\references{
Ryan P. Browne, Aisha ElSherbiny and Paul D. McNicholas (2018). mixture: Mixture Models for Clustering and
Classification. R package version 1.5.

Ryan P. Browne and Paul D. McNicholas (2014). Estimating Common Principal Components in High Dimensions.
Advances in Data Analysis and Classification, 8(2), 217-226.

Aitchison J. (1986). The statistical analysis of compositional data. Chapman & Hall.
}

\author{
Michail Tsagris.

R implementation and documentation: Michail Tsagris \email{mtsagris@uoc.gr}.
}

%\note{
%%  ~~further notes~~
%}

\seealso{
\code{\link{mix.diri}, \link{rmixdiri}, \link{bic.mixcompnorm}
}
}

\examples{
x <- as.matrix( iris[, 1:3] )
x <- x / rowSums(x)
bic.mixdiri(x, G = 3)
}

