Canonical correlation analysis finds linear combinations of an X-set and a Y-set that maximise their correlation. Multivariate generalisation of bivariate correlation.
Bivariate r asks 'how related are X and Y?' when each is a single variable. CCA asks the same when X and Y are each *sets* of variables: find weights a and b such that corr(a'X, b'Y) is maximised. The resulting canonical correlation r₁ is the maximum achievable correlation between any linear combination of X-set with any of Y-set; subsequent canonical functions are orthogonal to earlier ones.
Bartlett sequential test for retaining functions: at each step, test whether the remaining canonical correlations are jointly zero. Stop when the test becomes non-significant.
Two sets of ≥ 2 numeric variables + standardise toggle.
Per-function canonical r + r² + Bartlett sequential Wilks Λ χ² + X-side + Y-side coefficient matrices.
Retain functions while the Bartlett p stays significant. r₁² is the proportion of variance in the first Y canonical variate explained by the first X canonical variate.