

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
, where
are analysis variables specified in the VAR statement, and
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] \]](images/procstat_corr0024.png)
For example, the statements
proc corr; var x1 x2; with y1 y2 y3; run;
produce correlations for the following combinations:
![\begin{eqnarray*} \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] \end{eqnarray*}](images/procstat_corr0025.png)