Example: Matrix Output to and Then Input from Working File (PROXIMITIES command)

GET FILE='/data/crime.sav'.
PROXIMITIES MURDER TO MOTOR
  /ID=CITY
  /MATRIX=OUT(*).
PROXIMITIES
  /MATRIX=IN(*)
  /STANDARDIZE.
  • GET retrieves the IBM® SPSS® Statistics data file crime.sav.
  • The first PROXIMITIES command specifies variables for the analysis and reads data from file crime.sav. ID specifies CITY as the case identifier. MATRIX writes the resulting matrix to the active dataset.
  • The second PROXIMITIES command uses the matrix file that is written by the first PROXIMITIES command as input. The asterisk indicates that the matrix file is the active dataset. The variable list is omitted, indicating that all variables in the matrix are to be used.
  • The slash preceding the MATRIX subcommand on the second PROXIMITIES command is required. Without the slash, PROXIMITIES attempts to interpret MATRIX as a variable name rather than as a subcommand.