Specifies weights for observations in the statistical
||For information on how to calculate weighted
statistics and for an example that uses the WEIGHT statement, see WEIGHT
specifies a numeric variable whose values
weight the values of the analysis variables. The values of the variable do
not have to be integers. If the value of the weight variable is
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
from the analysis, use EXCLNPWGT. Note that most SAS/STAT procedures, such
as PROC GLM, exclude negative and zero weights by default.
To compute weighted
quantiles, use QMETHOD=OS in the PROC statement.
Skewness and kurtosis
are not available with the WEIGHT statement.
PROC MEANS will not compute MODE
when a weight variable is active. Instead, try using
The UNIVARIATE Procedure when
MODE needs to be computed and a weight variable is active.
If you use the WEIGHT=
option in a VAR statement to specify a weight variable, then PROC MEANS uses
this variable instead to weight those VAR statement variables.
When you use the WEIGHT
statement, consider which value of the VARDEF= option is appropriate. See
the discussion of VARDEF= and the calculation of weighted statistics in
Keywords and Formulas for more information.
Note: Before Version 7 of SAS, the
procedure did not
exclude the observations with missing weights from the count of observations.
- Single extreme weight values
can cause inaccurate results.
When one (and only one) weight
value is many orders of magnitude larger than the other weight values (for
example, 49 weight values of 1 and one weight value of 1×1014), certain statistics might not be within acceptable accuracy
limits. The affected statistics are based on the second moment (such as standard
deviation, corrected sum of squares, variance, and standard error of the mean).
Under certain circumstances, no warning is written to the SAS log.
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.