\Header{cancor}{Canonical Correlations}
\keyword{multivariate}{cancor}
\begin{Usage}
\begin{verbatim}
cancor(x, y, xcenter=TRUE, ycenter=TRUE)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\texttt{x}] a matrix containing the x coordinates.
\item[\texttt{y}] a matrix containing the y coordinates.
\item[\texttt{xcenter}] a parameter describing any centering to be done
on the x values before the analysis.  The default is substract
the column means, but it is possible to supply a vector of
values to be subtracted from the columns. It is possible to
turn off any adjustment.
\item[\texttt{ycenter}] like the parameter \texttt{xcenter}, but for the
y values.
\end{ldescription}
\end{Arguments}
\begin{Description}
This function performs a canonical correlation
analysis for the given data.  The analysis seeks
linear combinations of the y variables which are
well explained by linear combinations of the
x variables.\end{Description}
\begin{Value}
A list containing the following components:
\begin{ldescription}
\item[\texttt{xcoef}] estimated coefficients for the x variables.
\item[\texttt{ycoef}] estimated coefficients for the y variables.
\item[\texttt{xcenter}] the values used to adjust the x variables.
\item[\texttt{ycenter}] the values used to adjust the x variables.
\end{ldescription}
\end{Value}
\begin{References}
Hotelling H. (1936).
``Relations between two sets of variables''.
\emph{Biometrika}, \bold{28}, 321-327.

Seber, G. A. F. (1984).
\emph{Multivariate Analysis}. New York: Wiley.\end{References}
\begin{SeeAlso}
\texttt{\Link{qr}}, \texttt{\Link{svd}}.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
soil <- evap.x[,1:3]
air <- evap.x[,-(1:3)]
airsoil <- cancor(air, soil)
\end{ExampleCode}
\end{Examples}

