Example: Canonical Correlation Analysis
To create this example:
-
In SAS Studio, click
and select
New SAS Program.
-
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
to create the Work.Jobs data set.
-
In the
Tasks section,
expand the
Multivariate Analysis folder,
and then double-click
Canonical Correlation.
The user interface for the Canonical Correlation task opens.
-
On the
Data tab,
select the
WORK.JOBS data set.
Tip
If the data set is
not available from the drop-down list, click
. 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.
-
Assign columns to these
roles:
Role
|
Column
|
Variable
set 1
|
career
supervisor
finance
|
Variable
set 2
|
variety
feedback
autonomy
|
-
To run the task, click
.
Copyright © SAS Institute Inc. All rights reserved.