UCLA Academic Technology Services HomeServicesClassesContactJobs
Search

SPSS Textbook Examples
Computer-Aided Multivariate Analysis by Afifi, Clark and May
Chapter 16: Cluster analysis

Page 422 Table 16.2

get file 'c:\cama4\companies.sav'.
descriptives var = ror5 de salesgr5 npm1 payoutr1
 /save.
list symbol obsno zror5 zde zsalesgr znpm1 zpayoutr.
  dia   1.00   .96293   -.00736   .42907   .27749    1.28929   -.23733   .15057
  dow   2.00   .96293   -.00736   .05048  -.05684    1.33381   -.44192  -.21655
  stf   3.00   .96293   -.55933  -.29025   .22973    1.60093   -.44192  -.00701
  dd    4.00   .66060   -.92731  -.49216  -.24788     .48794   -.23733  1.28945
  uk    5.00  -.17082   -.55933  -.40383  -.61803    1.06669   -1.05570 -.66757
  psm   6.00  -.24640   -.37534  -.59312   .15809    -.22438    -.85111   .82860
  gra   7.00  -.20861   -.37534  -.83289  -.73743     .22082    -.03273  -.23085
  hpc   8.00  -.05744   -.74332  -.68146  -.53445     .08726    -.23733   .59662
  mtc   9.00  -.35978   -.55933  -.41645  -.86878    -.35794     .17186  1.33015
  acy  10.00  -.20861   -.55933  -.59312 -1.07176     .13178    -.23733   .66787
  cz   11.00  -.96444   -.55933  -.75718   .33719    -.40246    -.64652   .65447
  ald  12.00  -1.19119  -.19135  -.17667  -.98818     .35438    -.64652 -1.08741
  rom  13.00  -1.00224  -.55933  -.73194 -1.21505     .57698    -.64652  -.73904
  rei  14.00  -1.49353  -.55933   .23977  -1.94341  -1.33737    -.03273  -.18999
  hum  15.00   -.47315  3.67244  2.90251   2.53422    .66601    2.21779  -.13474
  hca  16.00   -.58653   .36062  1.38816   1.23272   1.06669    2.42239 -1.97891
  nme  17.00   -.77549   .91259  2.76370   1.36406    .26534    1.80861  -.84038
  ami  18.00   -.54874   .72860   .66884   1.04167    .75505    1.80861  -.83807
  ahs  19.00    .92514  -.74332  -.10096    .36108    .62149     .78564  -.96513
  lks  20.00   1.79435  -.00736  -.18929   -.18818  -1.24833    -.44192  1.53644
  win  21.00   3.00368  -.92731  -.22715   -.18818  -1.20381    -.23733  1.37083
  sgl  22.00   -.20861  1.64855  -.90861   1.32824  -1.47093    -.85111 -1.70857
  slc  23.00   -.20861   .72860   .13882    .25361  -1.20381    -.44192  -.69548
  kr   24.00   -.09524  -.37534  -.53002    .57600  -1.51545    -.85111   .37012
  sa   25.00   -.47315   .54461  -.65622  -1.03594  -1.55997    -.64652  1.50460

Number of cases read:  25    Number of cases listed:  25

Page 423 Figure 16.3

varstocases
 /make xaxis from zror5 zde zsalesgr zeps5 znpm1 zpe zpayoutr.
use 1 thru 7.
graph
 /line(simple)=value(xaxis).

Page 424 Figure 16.4

NOTE:  The execute command after the filter command is necessary for the filter to work correctly.

get file 'c:\cama4\companies.sav'.
descriptives var = ror5 de salesgr5 eps5 npm1 pe payoutr1
 /save.
compute zror51 = -zror5.
compute zpay1 = -zpayoutr.
varstocases
 /make yaxis from zror51 zde zsalesgr zeps5 znpm1 zpe zpay1
 /index = variable.
compute filter = (obsno ge 15 and obsno le 21).
exe.
filter by filter.
igraph
 /x1 = var(variable) type = categorical
 /y = var(yaxis) type = scale (min = -3.0 max = 4.0)
 /color = var(symbol) type = categorical
 /catorder var(newvar) (ascending values omitempty)
 /catorder var(symbol) (ascending values omitempty)
 /line(mean) key = on style = line interpolate = straight.

Page 433 Figure 16.9

get file 'c:\cama4\companies.sav'.
descriptives var = ror5 de salesgr5 eps5 npm1 pe payoutr1
 /save.
cluster zror5 zde zsalesgr zeps5 znpm1 zpe zpayoutr
 /measure = seuclid
 /method = centroid
 /plot = dendrogram.

* * * * * * H I E R A R C H I C A L  C L U S T E R   A N A L Y S I S * * * * * * 

 Dendrogram using Centroid Method 

                      Rescaled Distance Cluster Combine 

   C A S E    0         5        10        15        20        25

  Label  Num  +---------+---------+---------+---------+---------+

 

           8   тш
          10  
тфтш
           7  
тч у
           9  
тттфтш
           6  
тытч щтттш
          11  
тч   у   у
           4  
тттттч   у
          12  
тытш     у
          13  
тч щтттттъ
           5  
тттч     щтш
           1  
тш       у у
           2  
тфтттттш у щтттттш
           3  
тч     щтч у     у
          19  
тттттттч   у     щтш
          23  
тттттттытттч     у у
          24  
тттттттч         у щтттттш
          25  
тттттттттттттттттч у     щтттттттш
          14  
тттттттттттттттттттч     у       у
          20  
тттттытттттттттттттттттттч       щтттттттттттттттш
          21  
тттттч                           у               у
          22  
тттттттттттттттттттттттттттттттттч               у
          16  
тттттытттш                                       у
          18  
тттттч   щтттттттттттттттттттттттш               у
          17  
тттттттттч                       щтттттттттттттттч
          15  
тттттттттттттттттттттттттттттттттч

  Page 435 Table 16.4

quick cluster zror5 zde zsalesgr zeps5 znpm1 zpe zpayoutr
 /criteria = cluster (3)
 /method = kmeans(noupdate)
 /print initial cluster distan.
<some output omitted>

Page 436 Figure 16.10

NOTE:  We were unable to reproduce this graph.


How to cite this page

Report an error on this page

UCLA Researchers are invited to our Statistical Consulting Services
We recommend others to our list of Other Resources for Statistical Computing Help
These pages are Copyrighted (c) by UCLA Academic Technology Services


The content of this web site should not be construed as an endorsement of any particular web site, book, or software product by the University of California