
A command that creates a CCA object from the selected TableOfReal object.
Calculates canonical correlations between the dependent and the independent parts of the table. The corresponding canonical coefficients are also determined.
The canonical correlation equations for two data sets T_{y} [n × p] and T_{x} [n × q] are:
(1) (S_{yx} S_{xx}^{1} S_{yx}′ λ S_{yy})y = 0 
(2) (S_{yx}′ S_{yy}^{1} S_{yx} λ S_{xx})x = 0 
where S_{yy} [p × p] and S_{xx} [q × q] are the covariance matrices of data sets T_{y} and T_{x}, respectively, S_{yx} [p × q] is the matrix of covariances between data sets T_{y} and T_{x}, and the vectors y and x are the canonical weights or the canonical function coefficients for the dependent and the independent data, respectively. In terms of the (dependent) data set T_{y} and the (independent) data set T_{x}, these covariances can be written as:
S_{yy} = T_{y}′ T_{y}, S_{yx} = T_{y}′ T_{x} and S_{xx} = T_{x}′ T_{x}. 
The following singular value decompositions
T_{y} = U_{y} D_{y} V_{y}′ and T_{x} = U_{x} D_{x} V_{x}′ 
transform equation (1) above into:
(3) (V_{y} D_{y} U_{y}′U_{x} U_{x}′ U_{y} D_{y} V_{y}′  λ V_{y} D_{y} D_{y} V_{y}′)y = 0 
where we used the fact that:
S_{xx}^{1} = V_{x} D_{x}^{2} V_{x}′. 
Equation (3) can be simplified by multiplication from the left by D_{y}^{1} V_{y}' to:
(4) ((U_{x}′ U_{y})′ (U_{x}′ U_{y})  λ I)D_{y} V_{y}′ y = 0 
This equation can, finally, be solved by a substitution of the s.v.d of U_{x}′ U_{y} = U D V′ into (4). This results in
(5) (D^{2}  λ I) V′ D_{y} V_{y}′ y = 0 
In an analogous way we can reduce eigenequation (2) to:
(6) (D^{2}  λ I) U′ D_{x} V_{x}′ x = 0 
From (5) and (6) we deduce that the eigenvalues in both equations are equal to the squared singular values of the product matrix U_{x}′U_{y}. These singular values are also called canonical correlation coefficients. The eigenvectors y and x can be obtained from the columns of the following matrices Y and X:
Y = V_{y} D_{y}^{1} V 
X = V_{x} D_{x}^{1} U 
For example, when the vector y equals the first column of Y and the vector x equals the first column of X, then the vectors u = T_{y}y and v = T_{x}x are the linear combinations from T_{y} and T_{x} that have maximum correlation. Their correlation coefficient equals the first canonical correlation coefficient.
© djmw, April 24, 2002