The HPSUMMARY Procedure

VAR Statement

  • VAR variables </ WEIGHT=weight-variable>;

The VAR statement identifies the analysis variables and their order in the output. If you omit the VAR statement, then PROC HPSUMMARY analyzes all numeric variables that are not listed in the other statements. When all variables are character variables, PROC SUMMARY produces a simple count of observations. You can use multiple VAR statements.

Required Argument


identifies one or more analysis variables and specifies their order in the results.

Optional Argument

WEIGHT= weight-variable

specifies a numeric variable whose values weight the values of the variables. The weight-variable does not have to be an integer. Table 10.6 describes how PROC HPSUMMARY treats various values of the weight-variable.

Table 10.6: Responses to Values of weight-variable




Counts the observation in the total number of observations

Less than 0

Converts the value to zero and counts the observation in the total number of observations


Excludes the observation

To exclude observations that contain negative and zero weights from the analysis, use the EXCLNPWGT option in the PROC HPSUMMARY statement.

The weight-variable does not change how the procedure determines the range, extreme values, or number of missing values.

To compute weighted quantiles, use QMETHOD= OS in the PROC HPSUMMARY statement. Skewness and kurtosis are not available with the WEIGHT= option.

When you use the WEIGHT= option, consider which value of the VARDEF= option is appropriate. Use the WEIGHT= option in multiple VAR statements to specify different weights for the analysis variables.