\HeaderA{stat.bwss}{Between and Within Group Sum of Squares Calculation}{stat.bwss}
\keyword{models}{stat.bwss}
\begin{Description}\relax
This function computes the between and within group sum
of squares for each row of a matrix which may have NAs.
\end{Description}
\begin{Usage}
\begin{verbatim}
stat.bwss(x, cl)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] a matrix, NAs allowed. In the microarray context, the rows
of \code{X} could correspond to genes and the columns to different
hybridizations.
\item[\code{cl}] column labels, must be consecutive integers.
\end{ldescription}
\end{Arguments}
\begin{Value}
List containing the following components
\begin{ldescription}
\item[\code{wn}] matrix with class sizes for each row of \code{X};
\item[\code{BW}] vector of BSS/WSS for each row of \code{X};
\item[\code{BSS}] between group sum of squares for each row of \code{X};
\item[\code{WSS}] within group sum of squares for each row of \code{X};
\item[\code{TSS}] total sum of squares for each row of \code{X};
\item[\code{tvar}] variance for each row of \code{X}.
\end{ldescription}
\end{Value}
\begin{Author}\relax
Sandrine Dudoit, \email{sandrine@stat.berkeley.edu}  \\
Jane Fridlyand, \email{janef@stat.berkeley.edu}
\end{Author}
\begin{References}\relax
S. Dudoit, J. Fridlyand, and T. P. Speed. Comparison of
Discrimination Methods for the Classification of Tumors Using Gene
Expression Data. June 2000. (Statistics, UC Berkeley,  Tech Report \#
576).
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{var.na}{var.na}}, \code{\LinkA{var}{var}}, \code{\LinkA{apply}{apply}}.
\end{SeeAlso}

