% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MCclustqual.R
\name{MCclustqual}
\alias{MCclustqual}
\title{Cluster quality measures by MC-sets}
\usage{
MCclustqual(
  disslist,
  ncluster = 10,
  clustmeth = "PAM",
  weights = NULL,
  core = 1,
  snow = TRUE,
  silent = FALSE,
  ...
)
}
\arguments{
\item{disslist}{List of MC-dissimilarity matrices (or \code{dist} objects).}

\item{ncluster}{integer vector. Range of number of groups. Default is \code{2:10}.}

\item{clustmeth}{character. Clustering method. Either \code{"PAM"} (default) or a \code{stats::\link{hclust}} method.}

\item{weights}{vector of doubles. Case weights. If \code{NULL} (default), equal weights are used.}

\item{core}{Integer. Number of cores for parallel computing.}

\item{snow}{Logical. If \code{TRUE}, \code{doSNOW} is used for parallel computing, otherwise \code{doParallel} is used.}

\item{silent}{Logical. Should waiting and timing messages be hidden?}

\item{...}{Further arguments passed to clustering functions.}
}
\value{
A list with two lists: \code{qual.tab}, list of tables of cluster quality statistics per MC-dissimilarity matrix, and \code{qual.max} list of cluster number $k$ for which the statistics reach their maximum (minimum for HC), \code{max.freq}, the frequency table of maximum over the MC-replicated sets, and \code{qual.obs}, cluster quality indexes for the observed sequences.
}
\description{
Cluster quality measures for a range of number of groups by MC-replicated set.
}
\details{
When \code{attr(MCdisslist,"obs")} is \code{TRUE}, the last element of \code{disslist} is treated as the dissimilarity matrix of the observed sequences.
}
\examples{
## mini test data, 6 sequences of length 4, 4 unique sequences
exdata <- read.table(text="
                a a b b
                a a b b
                b b a a
                a c c b
                b b a c
                b b a c
                ")
weights=rep(1, nrow(exdata))
s.exdata <- seqdef(exdata, weights = weights, id=paste("id",1:nrow(exdata), sep=""))

## 3 altered sequence datasets
set.seed(25)
altseq.list <- MCseqReplicate(s.exdata, J=1, R=3)
## list of dissimilarity matrices
disslist <- MCdisslist(altseq.list, method="LCS")
diss.o <- seqdist(s.exdata, method="LCS")
## cluster per MC-dissimilarity matrices
res <- MCclustqual(disslist,ncluster=3)
res


}
\seealso{
\code{\link[WeightedCluster]{as.clustrange}},  \code{\link[WeightedCluster]{wcKMedRange}}
}
