13.2 - Example: Sales Data

13.2 - Example: Sales Data

Example 13-1: Sales

The example data comes from a firm that surveyed a random sample of n = 50 of its employees in an attempt to determine which factors influence sales performance. Two collections of variables were measured:

  • Sales Performance:
    • Sales Growth
    • Sales Profitability
    • New Account Sales
  • Test Scores as a Measure of Intelligence
    • Creativity
    • Mechanical Reasoning
    • Abstract Reasoning
    • Mathematics

There are p = 3 variables in the first group relating to Sales Performance and q = 4 variables in the second group relating to Test Scores.

Download the text file containing the data here: sales.csv

Canonical Correlation Analysis is carried out in SAS using a canonical correlation procedure that is abbreviated as cancorr. Let's look at how this is carried out in the SAS Program below

Download the SAS program here: sales.sas or click on the copy icon inside Explore the Code.

 

Note: In the upper right-hand corner of the code block you will have the option of copying ( ) the code to your clipboard or downloading ( ) the file to your computer.

options ls=78;
title "Canonical Correlation Analysis - Sales Data";

data sales;
  infile "D:\Statistics\STAT 505\data\sales.csv" firstobs=2 delimiter=',';
  input growth profit new create mech abs math;
  run;

 /* The vprefix and wprefix options specify names to separate the two
  * sets of variables for the analysis.
  * The vname and wname options are more descriptive string names to be used 
  * to describe the two sets of variables.
  * The var and with statements specify which variables go into each set.
  * They are referred to by the terms used in the vprefix and wprefix, respectively.
  */

proc cancorr data=sales out=canout
    vprefix=sales vname="Sales Variables" 
    wprefix=scores wname="Test Scores";
  var growth profit new;
  with create mech abs math;
  run;

 /* This plots the first canonical pair as a 2d scatterplot.
  * Other canonical pairs can also be plotted by changing
  * the variables used in the plot statement.
  */

proc gplot data=canout;
  axis1 length=3 in;
  axis2 length=4.5 in;
  plot sales1*scores1 / vaxis=axis1 haxis=axis2;
  symbol v=J f=special h=2 i=r color=black;
  run;

Legend
[1]Link
Has Tooltip/Popover
 Toggleable Visibility