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.

Operations<br />

Example<br />

Example<br />

Example<br />

VARIABLE LABELS 1645<br />

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

in the 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 />

• Variable labels are automatically displayed in the output from many procedures and are<br />

stored in the dictionary of the working data file.<br />

• VARIABLE LABELS can be used for variables that have no previously assigned variable<br />

labels. If a variable has a previously assigned variable label, the new label replaces the<br />

old label.<br />

VARIABLE LABELS YRHIRED ’YEAR OF FIRST HIRING’<br />

DEPT88 ’DEPARTMENT OF EMPLOYMENT IN 1988’<br />

SALARY88 ’YEARLY SALARY IN 1988’<br />

JOBCAT ’JOB CATEGORIES’.<br />

• Variable labels are assigned to the variables YRHIRED, DEPT88, SALARY88, and JOBCAT.<br />

VARIABLE LABELS OLDSAL "EMPLOYEE’S GROSS SALARY PRIOR"<br />

+ " TO 1988".<br />

• The label for OLDSAL is created by combining two strings with the plus sign. The blank<br />

between PRIOR and TO must be included in the first or second string to be included in the<br />

label.<br />

VARIABLE LABELS myvar "A Fairly Long Label \n That Always Wraps".<br />

FREQUENCIES myvar.<br />

Figure 2 Using \n to Wrap Variable Labels<br />

Valid<br />

1.00<br />

A Fairly Long Label<br />

That Always Wraps<br />

Frequency Percent Valid Percent<br />

Cumulative<br />

Percent<br />

1 100.0 100.0 100.0

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

Saved successfully!

Ooh no, something went wrong!