[R] Interpreting canonical correlation (cancor) results
Roland Goecke
D.Freiberg at t-online.de
Wed Dec 4 20:46:06 CET 2002
Hi,
from what I understand about the canonical correlation function
'cancor', it looks for correlations in two sets of variables, each
represented in matrix form. Right? Sounds exactly like what I need.
I have tried the following but I am not sure how to interpret the results.
AudioPCs <- c(ArTHarF0PCA$x[,2], ArTHarF1PCA$x[,2], ArTHarF2PCA$x[,2],
ArTHarF3PCA$x[,2], ArTHarRMSPCA$x[,2])
VideoPCs <- c(ArTHarHeightPCA$x[,2], ArTHarWidthPCA$x[,2],
ArTHarProUpperPCA$x[,2], ArTHarProLowerPCA$x[,2], ArTHarRelTeethPCA$x[,2])
AudioMatrix <- matrix(AudioPCs, nrow=20, ncol=5)
VideoMatrix <- matrix(VideoPCs, nrow=20, ncol=5)
ArTHarCCA <- cancor(AudioMatrix, VideoMatrix)
ArTHarCCA
$cor
[1] 0.852092 0.833079 0.467436 0.279688 0.026228
$xcoef
[,1] [,2] [,3] [,4] [,5]
[1,] -0.0118794 0.0305097 -0.058891 -0.0601489 0.029186
[2,] -0.0350698 0.0163593 0.086743 0.0642735 0.100922
[3,] 0.1228351 0.0035069 -0.061669 -0.0019221 0.047723
[4,] -0.0461149 0.0186040 0.057543 -0.0649049 -0.132400
[5,] -0.0021663 -0.0624439 0.071591 -0.0457682 0.029516
$ycoef
[,1] [,2] [,3] [,4] [,5]
[1,] -0.018006 -0.074138 -0.038670 0.0072364 0.082370
[2,] -0.293414 -0.176453 -0.015322 -0.0111357 -0.072555
[3,] 0.179000 0.048471 -0.103974 0.3313531 -0.049797
[4,] -0.126606 -0.088371 0.214449 -0.2998246 0.063524
[5,] 0.133073 0.011817 -0.073828 -0.0278944 -0.081489
$xcenter
[1] 1.9984e-16 2.2177e-15 -7.5495e-16 -2.6312e-15 1.5543e-16
$ycenter
[1] -5.5511e-17 1.4683e-15 -3.1086e-16 -1.9984e-16 -3.5527e-16
So in this example, I took the second principal components each from a
bunch of variables, stuck them together in matrices and then performed
CCA on it.
The results tell me that the correlation for two variables was quite
high 0.85 and 0.83 but how do I know which variables these actually are?
I mean the correlation values are always given in order from highest to
lowest, so that is not much help.
How can I find something like that? Or is all I can get out of this that
there is a linear combination of the parameters of set 1 that is well
correlated to the parameters of set 2?
Cheers
Roland
More information about the R-help
mailing list