Calculates the first canonical correlation between two sets of variables.
cancorRed(x, y, xcenter = TRUE, ycenter = TRUE)
Numeric matrix (n * p1), containing the x coordinates.
Numeric matrix (n * p2), containing the y coordinates.
Logical or numeric vector of length p1, describing any centering to be done on the x values before the analysis. If the argument is TRUE (default), then all columns are centered. Otherwise not adjustment is made.
analogous to xcenter, but for the y values.
First canonical correlation (numeric vector).
The canonical correlation analysis seeks linear combinations of the y variables which are well explained by linear combinations of the x variables. The relationship is symmetric as 'well explained' is measured by correlations.