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.

MATRIX—END MATRIX 925<br />

• The MGET and MSAVE statements read and write matrix-format SPSS data files, respecting<br />

the structure defined by SPSS when it creates the file. These statements are discussed below.<br />

• Case weighting in an SPSS data file is ignored when the file is read into a matrix program.<br />

Using a Working Data File<br />

You can use the GET statement to read a case-oriented working data file into a matrix variable.<br />

The result is a rectangular data matrix in which cases have become rows and variables<br />

have become columns. Special circumstances can affect the processing of this data matrix.<br />

Split-File Processing. After a SPLIT FILE command in SPSS, a matrix program executed with<br />

the INCLUDE command will read one split-file group with each execution of a GET statement.<br />

This enables you to process the subgroups separately within the matrix program.<br />

Case Selection. When a subset of cases is selected for processing, as the result of a SELECT IF,<br />

SAMPLE, or N OF CASES command, only the selected cases will be read by the GET statement<br />

in a matrix program.<br />

Temporary Transformations. The entire matrix program is treated as a single procedure by the<br />

SPSS system. Temporary transformations—those preceded by the TEMPORARY command—<br />

entered immediately before a matrix program are in effect throughout that program (even if<br />

you GET the working data file repeatedly) and are no longer in effect at the end of the matrix<br />

program.<br />

Case Weighting. Case weighting in a working data file is ignored when the file is read into a<br />

matrix program.<br />

MATRIX and END MATRIX <strong>Command</strong>s<br />

The MATRIX command, when encountered in an SPSS session, invokes the matrix processor,<br />

which reads matrix statements until the END MATRIX or FINISH command is encountered.<br />

• MATRIX is a procedure and cannot be entered inside a transformation structure such as DO<br />

IF or LOOP.<br />

• The MATRIX procedure does not require a working data file.<br />

• Comments are removed before subsequent lines are passed to the matrix processor.<br />

• Macros are expanded before subsequent lines are passed to the matrix processor.<br />

The END MATRIX command terminates matrix processing and returns control to the SPSS<br />

command processor.<br />

• The contents of matrix variables are lost after an END MATRIX command.<br />

• The working data file, if present, becomes available again after an END MATRIX command.

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

Saved successfully!

Ooh no, something went wrong!