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.

WEIGHT<br />

WEIGHT {BY varname}<br />

{OFF }<br />

Example<br />

WEIGHT BY V1.<br />

FREQUENCIES VAR=V2.<br />

Overview<br />

WEIGHT gives cases different weights (by simulated replication) for statistical analysis.<br />

WEIGHT can be used to weight a sample up to population size for reporting purposes or to<br />

replicate an example from a table or other aggregated data (see p. 328 for an example). With<br />

WEIGHT, you can arithmetically alter the sample size or its distribution.<br />

To apply weights resulting from your sampling design, see the Complex Samples option.<br />

Basic Specification<br />

The basic specification is keyword BY followed by the name of the weight variable. Cases<br />

are weighted according to the values of the specified variable.<br />

<strong>Syntax</strong> Rules<br />

• Only one numeric variable can be specified. The variable can be a precoded weighting<br />

variable, or it can be computed with the transformation language.<br />

• WEIGHT cannot be placed within a FILE TYPE—END FILE TYPE or INPUT PROGRAM—<br />

END INPUT PROGRAM structure. It can be placed nearly anywhere following these<br />

commands in a transformation program. See Appendix A for a discussion of the program<br />

states and the placement of commands.<br />

Operations<br />

• Unlike most transformations, WEIGHT takes effect as soon as it is encountered in the<br />

command sequence. Thus, special attention should be paid to its position among<br />

commands (see “<strong>Command</strong> Order” on p. 8 in Volume I).<br />

• Weighting is permanent during a session unless it is preceded by a TEMPORARY<br />

command, changed by another WEIGHT command, or turned off with the WEIGHT OFF<br />

specification.<br />

1663

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

Saved successfully!

Ooh no, something went wrong!