Previous: TEMPORARY, Up: Data Selection [Contents][Index]
WEIGHT BY var_name. WEIGHT OFF.
WEIGHT
assigns cases varying weights,
changing the frequency distribution of the active dataset. Execution of
WEIGHT
is delayed until data have been read.
If a variable name is specified, WEIGHT
causes the values of that
variable to be used as weighting factors for subsequent statistical
procedures. Use of keyword BY
is optional but recommended. Weighting
variables must be numeric. Scratch variables may not be used for
weighting (see Scratch Variables).
When OFF
is specified, subsequent statistical procedures will weight all
cases equally.
A positive integer weighting factor w on a case will yield the same statistical output as would replicating the case w times. A weighting factor of 0 is treated for statistical purposes as if the case did not exist in the input. Weighting values need not be integers, but negative and system-missing values for the weighting variable are interpreted as weighting factors of 0. User-missing values are not treated specially.
When WEIGHT
is specified after TEMPORARY
, it affects only
the next procedure (see TEMPORARY).
WEIGHT
does not cause cases in the active dataset to be
replicated in memory.