MEANS Procedure

VAR Statement

Identifies the analysis variables and their order in the output.
Default: If you omit the VAR statement, then PROC MEANS analyzes all numeric variables that are not listed in the other statements. When all variables are character variables, PROC MEANS produces a simple count of observations.
Tip: You can use multiple VAR statements.
See: SUMMARY Procedure
Computing Specific Descriptive Statistics


Required Argument

identifies the analysis variables and specifies their order in the results.

Optional Argument

specifies a numeric variable whose values weight the values of the variables that are specified in the VAR statement. The variable does not have to be an integer. The following table describes how PROC MEANS treats various values of the WEIGHT variable.
Weight Value
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 EXCLNPWGT. Note that most SAS/STAT procedures, such as PROC GLM, exclude negative and zero weights by default.
The weight variable does not change how the procedure determines the range, extreme values, or number of missing values.
Restrictions:To compute weighted quantiles, use QMETHOD=OS in the PROC statement.

Skewness and kurtosis are not available with the WEIGHT option.

Note:Before Version 7 of SAS, the procedure did not exclude the observations with missing weights from the count of observations.
Tips:When you use the WEIGHT option, consider which value of the VARDEF= option is appropriate. See the discussion of VARDEF=..

Use the WEIGHT option in multiple VAR statements to specify different weights for the analysis variables.