TableOfReal: To CCA...

A command that creates a CCA object from the selected TableOfReal object.


Dimension of dependent variate (ny)
defines the partition of the table into the two parts whose correlations will be determined. The first ny columns must be the dependent part, the rest of the columns will be interpreted as the independent part (nx columns). In general nx must be larger than or equal to ny.


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 Ty [n × p] and Tx [n × q] are:

(1) (Syx Sxx-1 Syx′ -λ Syy)y = 0
(2) (SyxSyy-1 SyxSxx)x = 0

where Syy [p × p] and Sxx [q × q] are the covariance matrices of data sets Ty and Tx, respectively, Syx [p × q] is the matrix of covariances between data sets Ty and Tx, 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 Ty and the (independent) data set Tx, these covariances can be written as:

Syy = TyTy, Syx = TyTx and Sxx = TxTx.

The following singular value decompositions

Ty = Uy Dy Vy′ and Tx = Ux Dx Vx

transform equation (1) above into:

(3) (Vy Dy UyUx UxUy Dy Vy′ - λ Vy Dy Dy Vy′)y = 0

where we used the fact that:

Sxx-1 = Vx Dx-2 Vx′.

Equation (3) can be simplified by multiplication from the left by Dy-1 Vy' to:

 (4) ((UxUy)′ (UxUy) - λ I)Dy Vyy = 0

This equation can, finally, be solved by a substitution of the s.v.d of UxUy = U D V′ into (4). This results in

(5) (D2 - λ I) VDy Vyy = 0

In an analogous way we can reduce eigenequation (2) to:

(6) (D2 - λ I) UDx Vxx = 0

From (5) and (6) we deduce that the eigenvalues in both equations are equal to the squared singular values of the product matrix UxUy. 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 = Vy Dy-1 V
X = Vx Dx-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 = Tyy and v = Txx are the linear combinations from Ty and Tx that have maximum correlation. Their correlation coefficient equals the first canonical correlation coefficient.

Links to this page

© djmw, April 24, 2002