% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MCclustcomp.R
\name{MCclustcomp}
\alias{MCclustcomp}
\title{Comparing MC-clusters with cluster of observed data}
\usage{
MCclustcomp(clustlist, clust.o = NULL, weights = NULL)
}
\arguments{
\item{clustlist}{List of MC-replicated vectors of cluster memberships.}

\item{clust.o}{Cluster memberships based on observed dissimilarities.}

\item{weights}{vector of doubles. Case weights. If \code{NULL} (default), equal weights are used.}
}
\value{
A table with in columns the list of comparison scores provided by \code{aricode::\link[aricode]{clustComp}} for each replicated set, except Chi2, which is replaced by Cramer's V.
}
\description{
Comparison indexes between clusters based on observed data and each of MC-replicated clusters.
}
\details{
When \code{diss.o=NULL}, the last element of \code{disslist} is taken as \code{diss.o} and the other elements as sets of MC-replicated dissimilarities.
}
\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
library(WeightedCluster)
clust.o <- wcKMedoids(diss.o, k=2, cluster.only=TRUE)
clustlist <- lapply(disslist, wcKMedoids, k=2, cluster.only=TRUE)
res <- MCclustcomp(clustlist, clust.o=clust.o)
res


}
\seealso{
\code{\link[aricode]{clustComp}}
}
