\HeaderA{SSD}{SSD matrix and estimated variance matrix in multivariate models}{SSD}
\aliasA{estVar}{SSD}{estVar}
\keyword{models}{SSD}
\keyword{multivariate}{SSD}
\begin{Description}\relax
Functions to compute matrix of residual sums of squares and products,
or the estimated varianve matrix for multivariate linear models.
\end{Description}
\begin{Usage}
\begin{verbatim}
# S3 method for class 'mlm' 
SSD(object, ...)

# S3 methods for class 'SSD' and 'mlm'
estVar(object, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{object}] \code{object} of class 'mlm', or 'SSD' in the case of 'estVar'
\item[\code{...}] Unused
\end{ldescription}
\end{Arguments}
\begin{Value}
\code{SSD} returns an list of class \code{"SSD"} containing the
followint components
\begin{ldescription}
\item[\code{SSD}] The residual sums of squares and products matrix
\item[\code{df}] Degrees of freedom
\item[\code{call}] Copied from \code{object}
\end{ldescription}


\code{estVar} returns a matrix with the estimated variances and
covariances.
\end{Value}
\begin{SeeAlso}\relax
\code{\LinkA{mauchley.test}{mauchley.test}}, \code{\LinkA{anova.mlm}{anova.mlm}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
# Lifted from Baron+Li:
# "Notes on the use of R for psychology experiments and questionnaires"
# Maxwell and Delaney, p. 497
reacttime <- matrix(c(
420, 420, 480, 480, 600, 780,
420, 480, 480, 360, 480, 600,
480, 480, 540, 660, 780, 780,
420, 540, 540, 480, 780, 900,
540, 660, 540, 480, 660, 720,
360, 420, 360, 360, 480, 540,
480, 480, 600, 540, 720, 840,
480, 600, 660, 540, 720, 900,
540, 600, 540, 480, 720, 780,
480, 420, 540, 540, 660, 780),
ncol = 6, byrow = TRUE, 
dimnames=list(subj=1:10,
              cond=c("deg0NA", "deg4NA", "deg8NA", 
                     "deg0NP", "deg4NP", "deg8NP"))) 

mlmfit <- lm(reacttime~1)
SSD(mlmfit)
estVar(mlmfit)
\end{ExampleCode}
\end{Examples}

