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.

428 DATA LIST<br />

Table 1 Interpretation of values in fixed and freefield format<br />

Values<br />

Example<br />

Default<br />

Fixed Freefield<br />

Two defined<br />

decimal places Default<br />

Two defined<br />

decimal places<br />

2001 2001 20.01 2001.00 2001.00<br />

201 201 2.01 201.00 201.00<br />

–201 –201 –2.01 –201.00 –201.00<br />

2 2 .02 2.00 2.00<br />

20 20 .20 20.00 20.00<br />

2.2 2.2 2.2 2.20 2.20<br />

.201 .201 .201 .201 .201<br />

2 01 Undefined Undefined Two values Two values<br />

DATA LIST<br />

/MODEL 1 RATE 2-6(PCT,2) COST 7-11(DOLLAR) READY 12-21(ADATE).<br />

BEGIN DATA<br />

1935 7878811-07-1988<br />

2 16754654606-08-1989<br />

3 17684783612-09-1989<br />

END DATA.<br />

• Data are inline and in fixed format (the default).<br />

• Each variable is followed by its column location. After the column location, a columnstyle<br />

format is specified in parentheses.<br />

• MODEL begins in column 1, is one column wide, and receives the default numeric F<br />

format.<br />

• RATE begins in column 2 and ends in column 6. The PCT format is specified with two<br />

decimal places. A comma is used to separate the format type from the number of decimal<br />

places. Decimal points are not coded in the data. Thus, the program reads the rightmost<br />

digits of each value as decimal digits. The value 935 for the first case in the data is interpreted<br />

as 9.35. Note that it does not matter where numbers are entered within the column<br />

width.<br />

• COST begins in column 7 and ends in column 11. DOLLAR format is specified.<br />

• READY begins in column 12 and ends in column 21. ADATE format is specified.<br />

Example<br />

DATA LIST FILE=DATA1<br />

/MODEL (F1) RATE (PCT5.2) COST (DOLLAR5) READY (ADATE10).<br />

• In this example, the FILE subcommand is used because the data are in an external file.<br />

• The variable definition is the same as in the preceding example except that FORTRANlike<br />

format specifications are used rather than column-style. Column locations are not<br />

specified. Instead, the format specifications include a width for each format type.

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

Saved successfully!

Ooh no, something went wrong!