Canonical Correlation Example -- Timm -- pg 314
Same data as Assignment 7 and Multiple Regression - Example 2

data timm;
input apt ppvt rpmt n s ns na ss;
cards;
49 48  8  1  2  6 12 16
47 76 13  5 14 14 30 27
11 40 13  0 10 21 16 16
 9 52  9  0  2  5 17  8
69 63 15  2  7 11 26 17
35 82 14  2 15 21 34 25
 6 71 21  0  1 20 23 18
 8 68  8  0  0 10 19 14
49 74 11  0  0  7 16 13
 8 70 15  3  2 21 26 25
47 70 15  8 16 15 35 24
 6 61 11  5  4  7 15 14
14 54 12  1 12 13 27 21
30 55 13  2  1 12 20 17
 4 54 10  3 12 20 26 22
24 40 14  0  2  5 14  8
19 66 13  7 12 21 35 27
45 54 10  0  6  6 14 16
22 64 14 12  8 19 27 26
16 47 16  3  9 15 18 10
32 48 16  0  7  9 14 18
37 52 14  4  6 20 26 26
47 74 19  4  9 14 23 23
 5 57 12  0  2  4 11  8
 6 57 10  0  1 16 15 17
60 80 11  3  8 18 28 21
58 78 13  1 18 19 34 23
 6 70 16  2 11  9 23 11
16 47 14  0 10  7 12  8
45 94 19  8 10 28 32 32
 9 63 11  2 12  5 25 14
69 76 16  7 11 18 29 21
35 59 11  2  5 10 23 24
19 55  8  0  1 14 19 12
58 74 14  1  0 10 18 18
58 71 17  6  4 23 31 26
79 54 14  0  6  6 15 14
;
proc cancorr all;
 var apt ppvt rpmt;
 with n s ns na ss;
run;

-----------------------------------------------------------------------------
                           Means and Standard Deviations

         3 'VAR' Variables
         5 'WITH' Variables
        37 Observations

               Variable              Mean           Std Dev
               APT              31.270270         22.100338
               PPVT             62.648649         12.526009
               RPMT             13.243243          3.094847
               N                 2.540541          2.949525
               S                 6.918919          5.068302
               NS               13.486486          6.353571
               NA               22.378378          7.243201
               SS               18.378378          6.369857

                 Correlations Among the Original Variables

                  Correlations Among the 'VAR' Variables

                           APT              PPVT              RPMT
        APT             1.0000            0.3703            0.2114
        PPVT            0.3703            1.0000            0.3548
        RPMT            0.2114            0.3548            1.0000


                  Correlations Among the 'WITH' Variables

                N             S            NS            NA            SS
 N         1.0000        0.4007        0.5370        0.6481        0.6704
 S         0.4007        1.0000        0.3523        0.6478        0.4252
 NS        0.5370        0.3523        1.0000        0.7136        0.7695
 NA        0.6481        0.6478        0.7136        1.0000        0.7951
 SS        0.6704        0.4252        0.7695        0.7951        1.0000


                 Correlations Among the Original Variables

     Correlations Between the 'VAR' Variables and the 'WITH' Variables

                 N             S            NS            NA            SS
APT         0.1860        0.1609        0.0685        0.2617        0.3341
PPVT        0.4444        0.2682        0.4692        0.6720        0.5876
RPMT        0.3504        0.2386        0.4388        0.3390        0.3404


                      Canonical Correlation Analysis

                               Adjusted       Approx       Squared
                Canonical      Canonical     Standard     Canonical
               Correlation    Correlation     Error      Correlation
          1      0.716526       0.655198     0.081098      0.513409
          2      0.490621       0.414578     0.126549      0.240709
          3      0.266778       0.211906     0.154805      0.071170

                              Eigenvalues of INV(E)*H
                                = CanRsq/(1-CanRsq)

               Eigenvalue    Difference    Proportion    Cumulative
          1       1.0551        0.7381       0.7283        0.7283
          2       0.3170        0.2404       0.2188        0.9471
          3       0.0766         .           0.0529        1.0000


                      Canonical Correlation Analysis

                   Test of H0: The canonical correlations in the
                     current row and all that follow are zero

             Likelihood
                Ratio      Approx F      Num DF      Den DF    Pr > F
        1    0.34316907      2.5381          15    80.45763    0.0039
        2    0.70525204      1.4308           8          60    0.2025
        3    0.92882959      0.7918           3          31    0.5078


                      Canonical Correlation Analysis
               Multivariate Statistics and F Approximations
                          S=3    M=0.5    N=13.5

Statistic                    Value          F      Num DF    Den DF  Pr > F
Wilks' Lambda             0.34316907     2.5381        15  80.45763  0.0039
Pillai's Trace            0.82528864     2.3529        15        93  0.0066
Hotelling-Lawley Trace    1.44875712     2.6722        15        83  0.0023
Roy's Greatest Root       1.05511542     6.5417         5        31  0.0003

       NOTE: F Statistic for Roy's Greatest Root is an upper bound.

                      Canonical Correlation Analysis

            Raw Canonical Coefficients for the 'VAR' Variables

                            V1                V2                V3
        APT       0.0032263523      -0.033176025      0.0358057012
        PPVT       0.076224788      -0.001671498      -0.048255281
        RPMT      0.0141322568      0.2756473326      0.2104352766


            Raw Canonical Coefficients for the 'WITH' Variables

                           W1                W2                W3
         N       -0.007150868      0.1599910602      0.0992870525
         S       -0.075658454      0.0421240468      0.1746238789
         NS      -0.035321752      0.2381604803      -0.010080608
         NA      0.1579154702      -0.059418808      -0.229030304
         SS      0.0435562566      -0.182391116      0.2019492827

                      Canonical Correlation Analysis

        Standardized Canonical Coefficients for the 'VAR' Variables

                              V1            V2            V3
              APT         0.0713       -0.7332        0.7913
              PPVT        0.9548       -0.0209       -0.6044
              RPMT        0.0437        0.8531        0.6513


       Standardized Canonical Coefficients for the 'WITH' Variables

                             W1            W2            W3
               N        -0.0211        0.4719        0.2928
               S        -0.3835        0.2135        0.8850
               NS       -0.2244        1.5132       -0.0640
               NA        1.1438       -0.4304       -1.6589
               SS        0.2774       -1.1618        1.2864

                            Canonical Structure

  Correlations Between the 'VAR' Variables and Their Canonical Variables

                              V1            V2            V3
              APT         0.4341       -0.5606        0.7052
              PPVT        0.9967        0.0102       -0.0803
              RPMT        0.3976        0.6906        0.6041


  Correlations Between the 'WITH' Variables and Their Canonical Variables

                             W1            W2            W3
               N         0.6320        0.3122        0.4004
               S         0.3879        0.1630        0.4521
               NS        0.6588        0.6406        0.2112
               NA        0.9422        0.1697        0.0814
               SS        0.8371        0.0675        0.4906


                            Canonical Structure

             Correlations Between the 'VAR' Variables and the
                Canonical Variables of the 'WITH' Variables

                              W1            W2            W3
              APT         0.3111       -0.2750        0.1881
              PPVT        0.7142        0.0050       -0.0214
              RPMT        0.2849        0.3388        0.1612

                            Canonical Structure

               Correlations Between the 'WITH' Variables and
              the Canonical Variables of the 'VAR' Variables

                             V1            V2            V3
               N         0.4529        0.1532        0.1068
               S         0.2780        0.0800        0.1206
               NS        0.4721        0.3143        0.0563
               NA        0.6751        0.0833        0.0217
               SS        0.5998        0.0331        0.1309
               
               
               			Canonical Redundancy Analysis

                   Raw Variance of the 'VAR' Variables
                               Explained by
                Their Own                               The Opposite
           Canonical Variables                       Canonical Variables

                      Cumulative     Canonical                  Cumulative
        Proportion    Proportion     R-Squared    Proportion    Proportion
   1        0.3809        0.3809        0.5134        0.1955        0.1955
   2        0.2414        0.6223        0.2407        0.0581        0.2536
   3        0.3777        1.0000        0.0712        0.0269        0.2805


                   Raw Variance of the 'WITH' Variables
                               Explained by
                Their Own                               The Opposite
           Canonical Variables                       Canonical Variables

                      Cumulative     Canonical                  Cumulative
        Proportion    Proportion     R-Squared    Proportion    Proportion
   1        0.5952        0.5952        0.5134        0.3056        0.3056
   2        0.1180        0.7132        0.2407        0.0284        0.3340
   3        0.1106        0.8238        0.0712        0.0079        0.3418


   Standardized Variance of the 'VAR' Variables
                   Explained by
      Their Own                           The Opposite
   Canonical Variables                   Canonical Variables

                Cumulative   Canonical              Cumulative
    Proportion  Proportion   R-Squared  Proportion  Proportion
 1      0.4467      0.4467      0.5134      0.2293      0.2293
 2      0.2638      0.7104      0.2407      0.0635      0.2928
 3      0.2896      1.0000      0.0712      0.0206      0.3134


  Standardized Variance of the 'WITH' Variables
                   Explained by
        Their Own                           The Opposite
   Canonical Variables                   Canonical Variables

                Cumulative   Canonical              Cumulative
    Proportion  Proportion   R-Squared  Proportion  Proportion
 1      0.5145      0.5145      0.5134      0.2641      0.2641
 2      0.1136      0.6281      0.2407      0.0273      0.2915
 3      0.1313      0.7594      0.0712      0.0093      0.3008

       Squared Multiple Correlations Between the 'VAR' Variables and
         the First 'M' Canonical Variables of the 'WITH' Variables

              M                1             2             3
              APT         0.0968        0.1724        0.2078
              PPVT        0.5100        0.5101        0.5105
              RPMT        0.0812        0.1960        0.2219


      Squared Multiple Correlations Between the 'WITH' Variables and
         the First 'M' Canonical Variables of the 'VAR' Variables

               M              1             2             3
               N         0.2051        0.2285        0.2400
               S         0.0773        0.0837        0.0982
               NS        0.2229        0.3216        0.3248
               NA        0.4558        0.4627        0.4632
               SS        0.3597        0.3608        0.3780