VAR
variables </ WEIGHT=weightvariable> ;
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.

variables

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

WEIGHT=
weightvariable

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

PROC HPSUMMARY Response

0

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

Missing

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 weightvariable 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.
Copyright © SAS Institute Inc. All Rights Reserved.