% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MCdisscorr.R
\name{MCdisscorr}
\alias{MCdisscorr}
\title{Correlation between observed and MC-simulated distances}
\usage{
MCdisscorr(disslist, diss.o = NULL, method = "Spearman", weights = NULL)
}
\arguments{
\item{disslist}{List of matrices or dist objects: the MC-replicated dissimilarities}

\item{diss.o}{Matrix or dist object: Observed dissimilarities}

\item{method}{String. One of \code{"Spearman"} (default) and \code{"Pearson"}.}

\item{weights}{vector of doubles. Case weights. If \code{NULL} (default), equal weights are used.}
}
\value{
vector of correlation between observed and MC-dissimilarities.
}
\description{
Correlation between observed and MC-simulated distances
}
\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, include.obs=TRUE)
## list of dissimilarity matrices
disslist <- MCdisslist(altseq.list)
MCdisscorr(disslist)


}
