\HeaderA{computeSD.func}{Function to estimate experimental variability of a sample}{computeSD.func}
\aliasA{}{computeSD.func}{}
\aliasA{computeSD.Samples}{computeSD.func}{computeSD.Samples}
\keyword{models}{computeSD.func}
\begin{Description}\relax
This functions estimate experimental variability of a given
sample. This value can be used to rank samples in terms of the quality
as well as to derive thresholds for declaring gained and lost clones.
\end{Description}
\begin{Usage}
\begin{verbatim}
computeSD.Samples(aCGH.obj, maxChrom = 22, maxmadUse = .3,
                  maxmedUse = .5, maxState = 3, minClone = 20)
computeSD.func(statesres = states.bic, maxmadUse = 0.2, maxmedUse = 0.2,
               maxState = 3, maxStateChange = 10, minClone = 20,
               maxChrom = 22)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{aCGH.obj}] Object of class \code{\LinkA{aCGH}{aCGH}}.

\item[\code{statesres}] The states.hmm object, generally is the output of
\code{\LinkA{mergeFunc}{mergeFunc}}.

\item[\code{maxmadUse}] Maximum median absolute deviation allowed to
controbute to the overall variability calculation.

\item[\code{maxmedUse}] Maximum median value for a state allowed to
contribute to the calculation.

\item[\code{maxState}] Maximum number of the states on a given chromosome for
the states from that chromosome to be allowed to enter noise
variability calculation.

\item[\code{maxStateChange}] Maximum number of changes from state to state on
a given chromosome for that chromosome to enter  noise variability
calculation.

\item[\code{minClone}] Minimum number of clones in a state for clones in that
sate to enter variability calculation.

\item[\code{maxChrom}] Maxiumum chromosomal index (generally only autosomes
are used for this calculation.

\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Median absolute deviation is estimated in all the states passing the
criteria defined by the parameters of the function. Then median of all
MADs on individual chromosomes as well as across all chromosomes is
taken to estimate chromosomal  experimental variability and sample
experimental variability.
\end{Details}
\begin{Value}
\begin{ldescription}
\item[\code{madChrom}] Returns a matrix containing estimated variability for
each chromosome for each sample.
\item[\code{madGenome}] Returns a vector with estimate of experimental
varibility for each sample.
\end{ldescription}
\end{Value}
\begin{Author}\relax
Jane Fridlyand
\end{Author}
\begin{References}\relax
Application of Hidden Markov Models to the analysis of the
array CGH data, Fridlyand et.al., \emph{JMVA}, 2004
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{aCGH}{aCGH}}
\end{SeeAlso}

