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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ADD VALUE LABELS<br />

ADD VALUE LABELS varlist value ’label’ value ’label’...[/varlist...]<br />

Example<br />

Overview<br />

ADD VALUE LABELS JOBGRADE ’P’ ’Parttime Employee’<br />

’C’ ’Customer Support’.<br />

ADD VALUE LABELS adds or alters value labels without affecting other value labels already<br />

defined for that variable. In contrast, VALUE LABELS adds or alters value labels but deletes<br />

all existing value labels for that variable when it does so.<br />

Basic Specification<br />

The basic specification is a variable name and individual values with associated labels.<br />

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

• Labels can be assigned to values of any previously defined variable. It is not necessary<br />

to enter value labels for all of a variable’s values.<br />

• Each value label must be enclosed in apostrophes or quotation marks.<br />

• When an apostrophe occurs as part of a label, enclose the label in quotation marks or<br />

enter the internal apostrophe twice with no intervening space.<br />

• Value labels can contain any characters, including blanks.<br />

• The same labels can be assigned to the same values of different variables by specifying<br />

a list of variable names. For string variables, the variables on the list must have the same<br />

defined width (for example, A8).<br />

• Multiple sets of variable names and value labels can be specified on one ADD VALUE<br />

LABELS command as long as each set is separated from the previous one by a slash.<br />

• To continue a label from one command line to the next, specify a plus sign (+) before<br />

the continuation of the label and enclose each segment of the label, including the blank<br />

between them, in apostrophes or quotes.<br />

Operations<br />

• Unlike most transformations, ADD VALUE LABELS takes effect as soon as it is encountered<br />

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

among commands. See “<strong>Command</strong> Order” on p. 8 for more information.<br />

87

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

Saved successfully!

Ooh no, something went wrong!