The HPCORR 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 that you specify in the VAR statement and $Y_1,\ldots ,Y_ n$ are variables that you specify 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:

\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*}