\HeaderA{mergeFunc}{Funtion to merge states based on their state means}{mergeFunc}
\aliasA{mergeHmmStates}{mergeFunc}{mergeHmmStates}
\keyword{models}{mergeFunc}
\begin{Description}\relax
\code{mergeFunc} takes the output of hmm.run.func (or find.hmm.states)
with a particular model selection criterion and iteratively merges the
states with means closer than a supplied threshold.
\code{mergeHmmStates} is a frontend for \code{mergeFunc} using
\code{\LinkA{aCGH}{aCGH}} object.
\end{Description}
\begin{Usage}
\begin{verbatim}
mergeHmmStates(aCGH.obj, model.use = 1, minDiff = 0.25)
mergeFunc(statesres = states.bic, minDiff = 0.1)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{aCGH.obj}] Object of class \code{\LinkA{aCGH}{aCGH}}.

\item[\code{statesres}] the sublist of the states.hmm list output from
\code{\LinkA{find.hmm.states}{find.hmm.states}} for a given model selection crterion

\item[\code{minDiff}] The states whose predicted values are less than minDiff
apart are merged into one state and all the predicited values are
recomputed.

\item[\code{model.use}] Model selection criterion to use, See \code{\LinkA{find.hmm.states}{find.hmm.states}}.

\end{ldescription}
\end{Arguments}
\begin{Details}\relax
This function is intended to reduce effect of the possible small
magnitude technological artifacts on the structure determination.
\end{Details}
\begin{Value}
List containing states.hmm object is returned.
\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}}, \code{\LinkA{find.hmm.states}{find.hmm.states}}
\end{SeeAlso}

