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.

Example<br />

Example<br />

Example<br />

Example<br />

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

NUMERIC 1103<br />

• NUMERIC declares variables V1 and V2 with format F4.0, and variable V3 with format<br />

F1.0.<br />

NUMERIC V1 TO V6 (F3.1) / V7 V10 (F6.2).<br />

• NUMERIC declares variables V1, V2, V3, V4, V5, and V6 each with format F3.1, and variables<br />

V7 and V10, each with format F6.2.<br />

NUMERIC SCALE85 IMPACT85 SCALE86 IMPACT86 SCALE87 IMPACT87<br />

SCALE88 IMPACT88.<br />

• Variables SCALE85 to IMPACT88 are added to the working data file in the order specified<br />

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

order in the working data file.<br />

* Predetermine variable order.<br />

INPUT PROGRAM.<br />

STRING CITY (A24).<br />

NUMERIC POP81 TO POP83 (F9)/ REV81 TO REV83(F10).<br />

DATA LIST FILE=POPDATA RECORDS=3<br />

/1 POP81 22-30 REV81 31-40<br />

/2 POP82 22-30 REV82 31-40<br />

/3 POP83 22-30 REV83 31-40<br />

/4 CITY 1-24(A).<br />

END INPUT PROGRAM.<br />

• STRING and NUMERIC are specified within an input program to predetermine variable<br />

order in the working data file. Though data in the file are in a different order, the working<br />

file dictionary uses the order specified on STRING and NUMERIC. Thus, CITY is the first<br />

variable in the dictionary, followed by POP81, POP82, POP83, REV81, REV82, and REV83.<br />

• Formats are specified for the variables on NUMERIC. Otherwise, the program uses the<br />

default numeric format (F8.2) from the NUMERIC command for the dictionary format, even<br />

though it uses the format on DATA LIST to read the data. In other words, the dictionary uses<br />

the first formats specified, even though DATA LIST may use different formats to read cases.

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

Saved successfully!

Ooh no, something went wrong!