REPORT Procedure

WEIGHT Statement

Specifies weights for analysis variables in the statistical calculations.
See: For information about calculating weighted statistics see Calculating Weighted Statistics. For an example that uses the WEIGHT statement, see Weighted Statistics Example.

Syntax

WEIGHT variable;

Required Argument

variable
specifies a numeric variable whose values weight the values of the analysis variables. The value of the variable does not have to be an integer. If the value of variable is
Note: Prior to Version 7 of SAS, the procedure did not exclude the observations with missing weights from the count of observations.
Weight Value
PROC REPORT 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
Restriction:PROC REPORT will not compute MODE when a weight variable is active. Instead, try using PROC UNIVARIATE when MODE needs to be computed and a weight variable is active.
Tip:When you use the WEIGHT statement, consider which value of the VARDEF= option is appropriate. See VARDEF= and the calculation of weighted statistics in Keywords and Formulas for more information.

Details

Weight Information Is Not Saved

When you store a report definition, PROC REPORT does not store the WEIGHT statement.