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.

NUMERIC<br />

NUMERIC varlist[(format)] [/varlist...]<br />

Example<br />

Overview<br />

NUMERIC V1 V2 (F4.0) / V3 (F1.0).<br />

NUMERIC declares new numeric variables that can be referred to in the transformation<br />

language before they are assigned values. <strong>Command</strong>s such as COMPUTE, IF, RECODE, and<br />

COUNT can be used to assign values to the new numeric variables.<br />

Basic Specification<br />

The basic specification is the name of the new variables. By default, variables are assigned<br />

a format of F8.2 (or the format specified on the SET command).<br />

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

• A FORTRAN-like format can be specified in parentheses following a variable or variable<br />

list. Each format specified applies to all variables in the list. To specify different<br />

formats for different groups of variables, separate each format group with a slash.<br />

• Keyword TO can be used to declare multiple numeric variables. The specified format<br />

applies to each variable named and implied by the TO construction.<br />

• NUMERIC can be used within an input program to predetermine the order of numeric variables<br />

in the dictionary of the working data file. When used for this purpose, NUMERIC<br />

must precede DATA LIST in the input program.<br />

Operations<br />

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

command sequence. Special attention should be paid to its position among commands.<br />

For more information, see “<strong>Command</strong> Order” on p. 8 in Volume I.<br />

• The specified formats (or the defaults) are used as both print and write formats.<br />

• Permanent or temporary variables are initialized to the system-missing value. Scratch<br />

variables are initialized to 0.<br />

• Variables named on NUMERIC are added to the working file in the order in which they<br />

are specified. The order in which they are used in transformations does not affect their<br />

order in the working data file.<br />

1102

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

Saved successfully!

Ooh no, something went wrong!