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 947<br />

For a name without indexes:<br />

• GET creates the specified matrix variable.<br />

• The size of the matrix is determined by the amount of data read from the SPSS data file or<br />

the working file.<br />

• If the matrix already exists, it is replaced by the matrix read from the file.<br />

For an indexed name:<br />

• GET creates a submatrix from an existing matrix.<br />

• The matrix variable named must already exist.<br />

• You can define any submatrix with indexes; for example, M(:,I). To define an entire<br />

existing matrix, specify M(:,:).<br />

• The indexes, along with the size of the existing matrix, specify completely the size of the<br />

submatrix, which must agree with the dimensions of the data read from the SPSS data file.<br />

• The specified submatrix is replaced by the matrix elements read from the SPSS data file.<br />

FILE Specification<br />

FILE designates the SPSS data file to be read. Use an asterisk, or simply omit the FILE specification,<br />

to designate the current working data file.<br />

• The file reference can be either a filename enclosed in apostrophes or quotation marks, or a<br />

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

• If you omit the FILE specification, the working data file is used.<br />

• In a matrix program executed with the INCLUDE command, if a SPLIT FILE command is in<br />

effect, a GET statement that references the working data file will read a single split-file<br />

group of cases. (A matrix program cannot be executed from a syntax window if a SPLIT<br />

FILE command is in effect.)<br />

VARIABLES Specification<br />

VARIABLES specifies a list of variables to be read from the SPSS data file.<br />

• The variable list is entered much the same as in other SPSS procedures except that the variable<br />

names must be separated by commas.<br />

• The keyword TO can be used to reference consecutive variables on the SPSS data file.<br />

• The variable list can consist of the keyword ALL to get all the variables in the SPSS data file.<br />

ALL is the default if the VARIABLES specification is omitted.<br />

• All variables read from the SPSS data file should be numeric. If a string variable is specified,<br />

a warning message is issued and the string variable is skipped.<br />

Example<br />

GET M /VARIABLES = AGE, RESIDE, INCOME TO HEALTH.<br />

• The variables AGE, RESIDE, and INCOME to HEALTH from the working data file will form<br />

the columns of the matrix M.

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

Saved successfully!

Ooh no, something went wrong!