Example: Canonical Correlation Analysis

To create this example:
  1. In SAS Studio, click New Options Icon and select New SAS Program.
  2. Copy and paste this code into the Program tab.
    data jobs;
       input career supervisor finance variety feedback autonomy;
       datalines;
    72 26 9 10 11 70
    63 76 7 85 22 93
    96 31 7 83 63 73
    96 98 6 82 75 97
    84 94 6 36 77 97
    66 10 5 28 24 75
    31 40 9 64 23 75
    45 14 2 19 15 50
    42 18 6 33 13 70
    79 74 4 23 14 90
    39 12 2 37 13 70
    54 35 3 23 74 53
    60 75 5 45 58 83
    63 45 5 22 67 53
    run;
    Click Submit SAS Code to create the Work.Jobs data set.
  3. In the Tasks section, expand the Multivariate Analysis folder, and then double-click Canonical Correlation. The user interface for the Canonical Correlation task opens.
  4. On the Data tab, select the WORK.JOBS data set.
    Tip
    If the data set is not available from the drop-down list, click Select a table icon. In the Choose a Table window, expand the library that contains the data set that you want to use. Select the data set for the example and click OK. The selected data set should now appear in the drop-down list.
  5. Assign columns to these roles:
    Role
    Column
    Variable set 1
    career
    supervisor
    finance
    Variable set 2
    variety
    feedback
    autonomy
  6. To run the task, click Submit SAS Code.
Here is a subset of the results:
Canonical Correlation