The HPCORR Procedure

PROC HPCORR Statement

  • PROC HPCORR <options>;

Table 1 summarizes the options available in the PROC HPCORR statement.

Table 1: Summary of PROC HPCORR Options

Option Description
Data Sets
DATA= Specifies the input data set
OUTP= Specifies the output data set with Pearson correlation statistics
Statistical Analysis
EXCLNPWGT Excludes from the analysis observations that have nonpositive weight values
NOMISS Excludes from the analysis observations that have missing analysis values
Pearson Correlation Statistics
COV Computes covariances
CSSCP Computes corrected sums of squares and crossproducts
SSCP Computes sums of squares and crossproducts
Printed Output
BEST= Displays the specified number of ordered correlation coefficients
NOCORR Suppresses Pearson correlations
NOPRINT Suppresses all printed output
NOPROB Suppresses p-values
NOSIMPLE Suppresses descriptive statistics
RANK Displays ordered correlation coefficients


You can specify the following options in the PROC HPCORR statement:

BEST=n

prints the n highest correlation coefficients for each variable. The value of n must be greater than or equal to 1. Correlations are ordered from highest to lowest in absolute value. If you do not specify this option, PROC HPCORR prints correlations in a rectangular table, using the variable names as row and column labels.

COV

displays the variance/covariance matrix. When you specify this option, the Pearson correlations are also displayed. If you specify the OUTP= option, the output data set also contains the covariance matrix with the corresponding _TYPE_ variable value COV.

CSSCP

displays a table of the corrected sums of squares and crossproducts. When you specify this option, the Pearson correlations are also displayed. If you specify the OUTP= option, the output data set also contains a CSSCP matrix with the corresponding _TYPE_ variable value CSSCP.

DATA=SAS-data-set

names the SAS data set to be analyzed by PROC HPCORR. If you do not specify this option, PROC HPCORR uses the most recently created SAS data set.

EXCLNPWGT
EXCLNPWGTS

excludes from the analysis observations that have nonpositive weight values. If you do not specify this option, PROC HPCORR treats observations with negative weights like those with zero weights and counts them in the total number of observations.

NOCORR

suppresses the display of the Pearson correlations. If you specify the OUTP= option, the data set _TYPE_ remains CORR. To change the data set type to COV, CSSCP, or SSCP, use the (TYPE=) data set option.

NOMISS

excludes from the analysis observations that have missing values. If you do not specify this option, PROC HPCORR computes correlation statistics by using all of the nonmissing pairs of variables. Using this option is computationally more efficient.

NOPRINT

suppresses all displayed output. Use this option if you only want to create an output data set.

NOPROB

suppresses the display of the probabilities that are associated with each correlation coefficient.

NOSIMPLE

suppresses the printing of simple descriptive statistics for each variable. However, if you request an output data set, the output data set still contains simple descriptive statistics for the variables.

OUTP=output-data-set
OUT=output-data-set

creates an output data set that contains Pearson correlation statistics. This data set also includes means, standard deviations, and the number of observations. The value of the _TYPE_ variable is CORR.

RANK

displays the ordered correlation coefficients for each variable. Correlations are ordered from highest to lowest in absolute value.

SSCP

displays a table of the sums of squares and crossproducts. When you specify this option, the Pearson correlations are also displayed. If you specify the OUTP= option, the output data set contains a SSCP matrix and the corresponding _TYPE_ variable value is SSCP.

VARDEF=DF | N | WDF | WEIGHT | WGT

specifies the variance divisor in the calculation of variances and covariances. The default is VARDEF=DF.

Table 2 shows the available values and associated divisors for the VARDEF= option, where n is the number of nonmissing observations and w Subscript j is the weight associated with the jth nonmissing observation.

Table 2: Possible Values for the VARDEF= Option

Value Description Divisor
DF Degrees of freedom n minus 1
N Number of observations n
WDF Sum of weights minus one sigma-summation Underscript j Overscript n Endscripts w Subscript j minus 1
WEIGHT | WGT Sum of weights sigma-summation Underscript j Overscript n Endscripts w Subscript j


Last updated: March 06, 2023