% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MCmdscorr.R
\name{MCmdscorr}
\alias{MCmdscorr}
\title{Correlation between 1st MDS factor of observed and MC-simulated distances}
\usage{
MCmdscorr(
  disslist,
  diss.o = NULL,
  method = "Spearman",
  weights = NULL,
  what = "corr",
  core = 1,
  snow = TRUE,
  silent = FALSE
)
}
\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.}

\item{what}{String. One of \code{"corr"} (correlations, default), \code{"mds"} (list of mds scores), and \code{"both"}.}

\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?}
}
\value{
when \code{what="corr"}, vector of correlation between mds of dissimilarities in MC-replicated sets, when \code{what="mds"}, of first mds scores, and when \code{what="both"}, list with \code{corr} as first element and \code{mdslist}, the list of mds scores as second element.
}
\description{
Correlation between 1st MDS factor of 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)
## list of dissimilarity matrices
disslist <- MCdisslist(altseq.list)
MCmdscorr(disslist)


}
