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.

MATRIX—END MATRIX 945<br />

defined on a FILE HANDLE command that precedes the matrix program. The filename or file<br />

handle must be a valid file specification.<br />

• The OUTFILE specification is required on the first WRITE statement in a matrix program<br />

(first in order of appearance, not necessarily in order of execution).<br />

• If you omit the OUTFILE specification from a later WRITE statement, the statement uses the<br />

most recently named file (in order of appearance) on a WRITE statement in the same matrix<br />

program.<br />

FIELD Specification<br />

FIELD specifies the column positions of a fixed-format record to which the data should be<br />

written.<br />

• The FIELD specification is required.<br />

• The start column, c1, is the number of the leftmost column of the output area.<br />

• The end column, c2, is the number of the rightmost column of the output area.<br />

• Both c1 and c2 are required, and both must be constants. For example,<br />

FIELD = 9 TO 72 specifies that values should be written between columns 9 and 72<br />

(inclusive) of each output record.<br />

• The BY clause, if present, indicates how many characters should be allocated to the output<br />

value of a single matrix element. The value w is the width of the area designated for each<br />

value. For example, FIELD = 1 TO 80 BY 10 indicates that up to eight values<br />

should be written per record, and that one should go between columns 1 and 10 (inclusive),<br />

another between columns 11 and 20, and so on up to columns 71 and 80. The value on the<br />

BY clause must evenly divide the length of the field. That is, c2 – c1 + 1 must be a multiple<br />

of w.<br />

• You can use the FORMAT specification (see below) to supply the same information as the<br />

BY clause. If you omit the BY clause from the FIELD specification and do not specify a<br />

format on the FORMAT specification, WRITE uses freefield format, separating matrix<br />

elements by single blank spaces.<br />

MODE Specification<br />

MODE specifies the format of the matrix to be written. If MODE is not specified, the default<br />

is RECTANGULAR.<br />

RECTANGULAR Write the entire matrix. Each row starts a new record, and all of the values in<br />

that row are present in that and (possibly) subsequent records. This is the<br />

default if the MODE specification is omitted.<br />

TRIANGULAR Write only the lower triangular entries and the main diagonal. Each row<br />

begins a new record and may span more than one record. This mode may<br />

save file space.<br />

• A matrix written with MODE = TRIANGULAR must be square, but it need not be<br />

symmetric. If it is not, values in the upper triangle are not written.<br />

• A matrix written with MODE = TRIANGULAR may be read with MODE = SYMMETRIC.

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

Saved successfully!

Ooh no, something went wrong!