Canonical Correlation

Technote (troubleshooting)


Older versions of SPSS had a procedure named CANCORR for canonical correlation analysis. I don't see such a procedure in the menus in my current version of SPSS. How do I do canonical correlation analysis in current releases of SPSS?

Resolving the problem

There are several ways to run canonical correlation analysis in SPSS Statistics. An extension, STATS CANCORR, is available from the SPSS Community website at This requires the Python Essentials, also available at the same site, or in recent versions in your installation materials. Beginning with Version 22, the Python Essentials are part of the default installation of the program, and you can download and install the STATS CANCORR extension via the menus: Utilities>Extension Bundles>Download and Install Extension Bundles. Once this is installed, you'll have a menu option under Analyze>Correlations to run canonical correlation analysis via a dialog box interface.

All versions of SPSS Statistics includes a command syntax file bundled with your product. The macro is named Canonical correlation.sps.

To run the canonical correlation macro, open a new syntax window, and execute the following form of command syntax:

INCLUDE 'Canonical correlation.sps'.
CANCORR SET1 = varlist1 / SET2 = varlist2 .

where varlist1 and varlist2 are your two sets of variables. You may need to specify the entire path name for the file, such as 'C:\Program Files\IBM\SPSS\Statistics\Samples\English\Canonical correlation.sps'.

Note that the data for the macro or the extension must be "raw" data, or cases (rows) by variables (columns). The macro does not handle a correlation matrix as input. If you have a correlation matrix to use as input, you must use the MANOVA procedure, which will require a vector of means, a vector of standard deviations, and a vector of Ns (which must all have the same value).

The MANOVA procedure performs canonical correlation analysis via the DISCRIM subcommand if you have only dependent variables and covariates. To get the information you would normally get with a canonical correlation analysis, you would also want to ask for EIGEN and DIM on the PRINT SIGNIF subcommand. So something similar to the following would be specified:

MANOVA y1 y2 y3 WITH x1 x2 x3

The ALL and ALPHA(1) tell MANOVA that you want to look at all the output and that you want to see all functions regardless of significance level.

You can adjust these according to your desires. About the only differences between MANOVA and the CANCORR macro are that MANOVA produces extraneous output and will not save canonical scores. The macro produces only output specific to this task and will save canonical scores

Historical Number


Document information

More support for:

SPSS Statistics

Software version:

Not Applicable

Operating system(s):

Platform Independent

Reference #:


Modified date:


Translate my page

Content navigation