The CORR Procedure

Output Data Sets

If you specify the OUTP=, OUTS=, OUTK=, or OUTH= option, PROC CORR creates an output data set that contains statistics for Pearson correlation, Spearman correlation, Kendall’s tau-b, or Hoeffding’s $D$, respectively. By default, the output data set is a special data set type (TYPE=CORR) that many SAS/STAT procedures recognize, including PROC REG and PROC FACTOR. When you specify the NOCORR option and the COV, CSSCP, or SSCP option, use the TYPE= data set option to change the data set type to COV, CSSCP, or SSCP.

The output data set includes the following variables:

  • BY variables, which identify the BY group when using a BY statement

  • _TYPE_ variable, which identifies the type of observation

  • _NAME_ variable, which identifies the variable that corresponds to a given row of the correlation matrix

  • INTERCEPT variable, which identifies variable sums when specifying the SSCP option

  • VAR variables, which identify the variables listed in the VAR statement

You can use a combination of the _TYPE_ and _NAME_ variables to identify the contents of an observation. The _NAME_ variable indicates which row of the correlation matrix the observation corresponds to. The values of the _TYPE_ variable are as follows:

  • SSCP, uncorrected sums of squares and crossproducts

  • CSSCP, corrected sums of squares and crossproducts

  • COV, covariances

  • MEAN, mean of each variable

  • STD, standard deviation of each variable

  • N, number of nonmissing observations for each variable

  • SUMWGT, sum of the weights for each variable when using a WEIGHT statement

  • CORR, correlation statistics for each variable

If you specify the SSCP option, the OUTP= data set includes an additional observation that contains intercept values. If you specify the ALPHA option, the OUTP= data set also includes observations with the following _TYPE_ values:

  • RAWALPHA, Cronbach’s coefficient alpha for raw variables

  • STDALPHA, Cronbach’s coefficient alpha for standardized variables

  • RAWALDEL, Cronbach’s coefficient alpha for raw variables after deleting one variable

  • STDALDEL, Cronbach’s coefficient alpha for standardized variables after deleting one variable

  • RAWCTDEL, the correlation between a raw variable and the total of the remaining raw variables

  • STDCTDEL, the correlation between a standardized variable and the total of the remaining standardized variables

If you use a PARTIAL statement, the statistics are calculated after the variables are partialled. If PROC CORR computes Pearson correlation statistics, MEAN equals zero and STD equals the partial standard deviation associated with the partial variance for the OUTP=, OUTK=, and OUTS= data sets. Otherwise, PROC CORR assigns missing values to MEAN and STD.