VARIABLES Specification (MATRIX-END MATRIX command)
You can provide variable names for the IBM® SPSS® Statistics data file with the VARIABLES
specification. The variable list
is a list of valid variable names separated by commas.
- You can use the
TO
convention, as shown in the example below. - You can also use the
NAMES
specification, discussed below, to provide variable names. - Long variable names (up to 64 bytes) are supported when explicitly specified on the
/VARIABLES
subcommand.
Example
SAVE {A,B,X,Y} /OUTFILE=*
/VARIABLES = A,B,X1 TO X50,Y1,Y2.
- The matrix expression on the
SAVE
statement constructs a matrix from two column vectors A and B and two matrices X and Y. All four matrix variables must have the same number of rows so that this matrix construction will be valid. - The
VARIABLES
specification provides descriptive names so that the variable names in the new active dataset will resemble the names used in the matrix program.