Function File: [A B r U V] = canoncorr (X, Y)

Canonical correlation analysis

Given X (size k*m) and Y (k*n), returns projection matrices of canonical coefficients A (size m*d, where d is the smallest of m, n, d) and B (size m*d); the canonical correlations r (1*d, arranged in decreasing order); the canonical variables U, V (both k*d, with orthonormal columns); and stats, a structure containing results from Bartlett’s chi-square and Rao’s F tests of significance.

References:
William H. Press (2011), Canonical Correlation Clarified by Singular Value Decomposition, http://numerical.recipes/whp/notes/CanonCorrBySVD.pdf
Philip B. Ender, Multivariate Analysis: Canonical Correlation Analysis, http://www.philender.com/courses/multivariate/notes2/can1.html

See also: princomp.

Package: statistics