## Technote (troubleshooting)

## Problem(Abstract)

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

SPSS 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 want to specify the entire path name for the file, such as 'C:\Program Files\SPSS\Canonical correlation.sps'.

Note that the data 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

/DISCRIM ALL ALPHA(1)

/PRINT=SIG(EIGEN DIM)

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

12720