SAS Institute. The Power to Know

Base SAS(R) 9.2 Procedures Guide: Statistical Procedures

Previous Page | Next Page

The CORR Procedure

WITH Statement
WITH variables ;


The WITH statement lists variables with which correlations of the VAR statement variables are to be computed. The WITH statement requests correlations of the form $r(X_ i,Y_ j)$, where $X_1,\ldots ,X_ m$ are analysis variables specified in the VAR statement, and $Y_1,\ldots ,Y_ n$ are variables specified in the WITH statement. The correlation matrix has a rectangular structure of the form

  \[ \left[ \begin{array}{ccc} r(Y_1,X_1) & \cdots & r(Y_1,X_ m) \\ \vdots & \ddots & \vdots \\ r(Y_ n,X_1) & \cdots & r(Y_ n,X_ m) \\ \end{array} \right] \]    


For example, the statements

   
   proc corr;
      var x1 x2;
      with y1 y2 y3;
   run;

produce correlations for the following combinations:

  $\displaystyle \left[ \begin{array}{ccc} r(Y1,X1) & r(Y1,X2) \\ r(Y2,X1) & r(Y2,X2) \\ r(Y3,X1) & r(Y3,X2) \\ \end{array} \right] $    
Previous Page | Next Page | Top of Page