## WEIGHT Statement

**WGT | WEIGHT** * variable ***;**

The WEIGHT statement specifies a numeric variable in the input
data set with values that are used to weight each observation.
Only one variable can be specified.

The WEIGHT variable values can be nonintegers.
An observation is used in the analysis only if the
value of the WEIGHT variable is greater than zero.
The WEIGHT variable applies only when you specify the option METHOD=MEAN, METHOD=SUM,
METHOD=EUCLEN, METHOD=USTD, METHOD=STD, METHOD=AGK, or METHOD=L.

PROC STDIZE uses the value of the WEIGHT variable *w*_{i}, as follows.

The sample mean and (uncorrected) sample variances are computed as

where *w*_{i} is the weight value of the *i*th observation,
*x*_{i} is the value of the *i*th observation, and *d* is the divisor
controlled by the VARDEF= option (see the VARDEF= option for
details).

PROC STDIZE uses the value of the WEIGHT variable to calculate the
following statistics:

- MEAN
- the weighted mean,

- SUM
- the weighted sum,
- USTD
- the weighted uncorrected standard deviation,
- STD
- the weighted standard deviation,
- EUCLEN
- the weighted Euclidean length, computed as the
square root of the weighted uncorrected sum of squares:

- AGK
- the AGK estimate. This estimate is documented further in the ACECLUS
procedure as the METHOD=COUNT option.
See the discussion of the WEIGHT statement in Chapter 16, "The ACECLUS Procedure,"
for information on how the WEIGHT variable is applied to the
AGK estimate.

- L
- the
*L*_{p} estimate. This estimate is documented further in the
FASTCLUS procedure as the LEAST= option.
See the discussion of the WEIGHT statement in Chapter 27, "The FASTCLUS Procedure,"
for information on how the WEIGHT variable is used to compute
weighted cluster means.
Note that the number of clusters is always 1.

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.