Skip to content

about cancor.R

2 messages · yan zhao, Brian Ripley

#
Hello,
I'm a beginning user of R, now I have a question about canonical correlation analysis (cca). 
In R,there is a function "cancor.R" used for cca; For example X(n*p1) and Y(n*p2)are the two matrix to be analyzed. In the example given by R, when n> max(p1,n2), cancor(X,Y) works; but when n<p1 or n<p2, cancor(X,Y) doesn't work well because cancor$cor == 1; how to cope with this case? maybe before apply the two matrix to cancor.R, some time-space transformation should be done? could you give some suggestion? Thanks you in advance!
Best regards,
Yan ZHAO
#
On Tue, 30 Nov 2004, yan zhao wrote:

            
There is no such function in R, and I can't find it in any add-on package.
Do you mean the function cancor() in the stats package?
You need to understand the underlying theory: the problem is not with the 
function but your use of the technique.  Assuming non-degenerate matrices, 
you have a situation in which one of the matrices spans the entire space 
of observations and so imposes no restriction.

R help pages come with references: please consult them.  Since you have 
not told us why you are using CCA, we can't help you with the 
methodological questions, even if they are off topic for the R-help list.