27.03.2013 Views

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

1664 WEIGHT<br />

Example<br />

• Each WEIGHT command overrides the previous one.<br />

• WEIGHT uses the value of the specified variable to arithmetically replicate cases for<br />

subsequent procedures. Cases are not physically replicated.<br />

• Weight values do not need to be integer.<br />

• Cases with missing or nonpositive values for the weighting variable are treated as having<br />

a weight of 0 and are thus invisible to statistical procedures. They are not used in calculations<br />

even where unweighted counts are specified. These cases do remain in the file,<br />

however, and are included in case listings and saved when the file is saved.<br />

• A file saved when weighting is in effect maintains the weighting.<br />

• If the weighted number of cases exceeds the sample size, tests of significance are inflated;<br />

if it is smaller, they are deflated.<br />

WEIGHT BY V1.<br />

FREQ VAR=V2.<br />

• The frequency counts for the values of variable V2 will be weighted by the values of<br />

variable V1.<br />

Example<br />

COMPUTE WVAR=1.<br />

IF (GROUP EQ 1) WVAR=.5.<br />

WEIGHT BY WVAR.<br />

• Variable WVAR is initialized to 1 with the COMPUTE command. The IF command changes<br />

the value of WVAR to 0.5 for cases where GROUP equals 1.<br />

• Subsequent procedures will use a case base in which cases from group 1 count only half<br />

as much as other cases.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!