Examples (WEIGHT command)

WEIGHT BY V1.
FREQ VAR=V2.
  • The frequency counts for the values of variable V2 will be weighted by the values of variable V1.
    COMPUTE WVAR=1.
    IF (GROUP EQ 1) WVAR=.5.
    WEIGHT BY WVAR.
  • Variable WVAR is initialized to 1 with the COMPUTE command. The IF command changes the value of WVAR to 0.5 for cases where GROUP equals 1.
  • Subsequent procedures will use a case base in which cases from group 1 count only half as much as other cases.