Example (CLUSTER command)

CLUSTER V1 TO V4
  /PLOT=DENDROGRAM
  /PRINT=CLUSTER (2 4).
  • This example clusters cases based on their values for all variables between and including V1 and V4 in the active dataset.
  • The analysis uses the default measure of distance (squared Euclidean) and the default clustering method (average linkage between groups).
  • PLOT requests a dendrogram.
  • PRINT displays a table of the cluster membership of each case for the two-, three-, and four-cluster solutions.

Used with the PROXIMITIES command to create distances

PROXIMITIES  price engine_s horsepow wheelbas width length
  curb_wgt fuel_cap mpg
  /MATRIX OUT  ('C:/TEMP/spssclus.tmp')
  /VIEW= CASE
  /MEASURE= SEUCLID
  /PRINT  NONE
  /ID= model
  /STANDARDIZE= VARIABLE Z .
CLUSTER
  /MATRIX IN  ('C:/TEMP/spssclus.tmp')
  /METHOD SINGLE
  /ID= model
  /PRINT SCHEDULE
  /PLOT DENDROGRAM.
ERASE FILE= 'C:/TEMP/spssclus.tmp'.