C     SSAR1                                                             SR1   1 
C     A GENERAL NONMETRIC TECHNIQUE FOR FINDING THE SMALLEST EUCLIDEAN  SR1   2 
C     SPACE FOR A CONFIGURATION OF POINTS.  SOLUTION FOR THE CASE IN-   SR1   3 
C     VOLVING TWO SETS OF POINTS WITH THE BETWEEN SET DISTANCES DEFINED SR1   4 
C     BUT THE WITHIN SET DISTANCES UNKNOWN.  DETERMINE THE SMALLEST     SR1   5 
C     SPACE FOR WHICH THE BETWEEN DISTANCES ARE MONOTONIC WITH ORIGINAL SR1   6 
C     DISTANCES.  NONMETRIC PROGRAM FOR MULTIFACET DESIGNS.  THIS RE-   SR1   7 
C     SEARCH IN NONMETRIC METHODS SUPPORTED IN PART BY A GRANT TO L.    SR1   8 
C     GUTTMAN AND J. C. LINGOES FROM NSF (GS-929).  PROGRAMMED IN FOR-  SR1   9 
C     TRAN II FOR THE UNIV. OF MICHIGAN IBM-7090 BY J.C.LINGOES(1/15/66)SR1  10 
C                                                                       SR1  11 
C     DECK SET-UP FOR G-L(SSAR-I) -                                     SR1  12 
C                                                                       SR1  13 
C        1.   SYSTEM ID CARD/S.                                         SR1  14 
C        2.   BINARY PROGRAM.                                           SR1  15 
C        3.   TITLE CARD (PUNCH A 1 IN COLUMN 1 AND ANY BCD TITLE IN COLSR1  16 
C             -UMNS 2 TO 72, WHICH WILL BE PRINTED OUT FOR EACH PAGE OF SR1  17 
C             OUTPUT).                                                  SR1  18 
C        4.   PARAMETER CARD, 8 4-COLUMN FIELDS CONTAINING THE FOLLOW-  SR1  19 
C             ING INFORMATION SERIATUM -                                SR1  20 
C             A)  NS=THE NUMBER OF ROWS .LE. 50,                        SR1  21 
C             B)  NV=THE NUMBER OF COLUMNS .LE. 30, BUT SINCE ROW AND   SR1  22 
C                 COLUMN DESIGNATIONS ARE ARBITRARY,IF ONE HAS MORE COL-SR1  23 
C                 UMNS THAN ROWS THEY CAN BE INTERCHANGED,              SR1  24 
C             C)  MIND=0 OR BLANK IF THE PROGRAM IS TO DETERMINE THE MINSR1  25 
C                 -IMUM NUMBER OF DIMENSIONS FOR THE PROBLEM, OTHERWISE SR1  26 
C                 ANY NUMBER BETWEEN 1 AND 10 PROVIDED MIND .LE. MAXD,  SR1  27 
C                 IN WHICH CASE ALL SOLUTIONS FROM MIND TO MAXD WILL BE SR1  28 
C                 PRINTED OUT UNLESS THE NORMALIZED PHI GETS TO BE .LE. SR1  29 
C                 .000001 FOR A GIVEN M, THE NUMBER OF DIMENSIONS,      SR1  30 
C             D)  MAXD=THE LARGEST NUMBER OF DIMENSIONS DESIRED .LE.    SR1  31 
C                 (NV-1,10)MIN,                                         SR1  32 
C             E)  ISIM=0 OR BLANK FOR DISTANCE COEFFICIENTS OR DISSIMI- SR1  33 
C                 LARITY DATA AND 1 IF SIMILARITY DATA, E.G., CORRELA-  SR1  34 
C                 TIONS,                                                SR1  35 
C             F)  IFD=1 IF DISTANCE MATRIX IS TO BE PRINTED FOR 2 OR    SR1  36 
C                 MORE DIMENSIONS, OTHERWISE SET TO ZERO OR LEAVE BLANK,SR1  37 
C             G)  IFC=1 IF COORDINATES ARE TO BE PUNCHED FOR 2 OR MORE  SR1  38 
C                 DIMENSIONS, OTHERWISE SET TO ZERO OR LEAVE BLANK,     SR1  39 
C             H)  IFCB=1 IF CITY-BLOCK MODEL IS TO BE USED (N.B. IF THISSR1  40 
C                 ALTERNATIVE IS USED MIND MUST BE .G. 0), OTHERWISE SETSR1  41 
C                 TO ZERO OR LEAVE BLANK FOR EUCLIDEAN MODEL.           SR1  42 
C        5.   FORMAT CARD (DESCRIBING IN F-NOTATION WHERE THE DATA      SR1  43 
C             APPEARS ON THE CARDS).                                    SR1  44 
C        6.   DATA (PUNCH EACH ROW ON 1 SET OF CARDS, YIELDING NS SETS  SR1  45 
C             WITH NV ELEMENTS (COLUMN FIELDS) IN EACH SET).            SR1  46 
C        7.   REPEAT ITEMS 3-6 FOR ADDITIONAL RUNS.                     SR1  47 
C                                                                       SR1  48 
C     *** REFERENCES - GUTTMAN, L. A GENERAL NONMETRIC TECHNIQUE FOR    SR1  49 
C                                  FINDING THE SMALLEST EUCLIDEAN SPACE SR1  50 
C                                  FOR A CONFIGURATION OF POINTS.  PSY- SR1  51 
C                                  CHOMETRIKA, 1968,                    SR1  52 
C                      LINGOES, J. C.  AN IBM-7090 PROGRAM FOR GUTTMAN- SR1  53 
C                                  LINGOES SMALLEST SPACE ANALYSIS - I. SR1  54 
C                                  BEHAV. SCI., 1965,10,183-184.        SR1  55 
C                      LINGOES, J. C.  AN IBM-7090 PROGRAM FOR GUTTMAN- SR1  56 
C                                  LINGOES SMALLEST SPACE ANALYSIS - RI.SR1  57 
C                                  BEHAV. SCI., 1966,11, 322.           SR1  58 
C                      LINGOES, J. C. AND VANDENBERG, S. G.  A NONMETRICSR1  59 
C                                  ANALYSIS OF TWIN DATA BASED ON A MUL-SR1  60 
C                                  TIFACETED DESIGN.  RES. RPT.,1966,   SR1  61 
C                                  17, 1-19.                            SR1  62 
C                                                                       SR1  63 
      DIMENSION RHO(80,80), RHO1(80,80), C(80,80), X(80,10), X1(80,11), SR1  64 
     1INDI(1500), INDJ(1500), DIST(1500), EVAL(6400), EVEC(6400), PSI1(1SR1  65 
     200), FMT(18), NOTIES(400), ITIE(6400)                             SR1  66 
      COMMON RHO,RHO1,X,X1,INDI,INDJ,DIST,NOTIES                        SR1  67 
      EQUIVALENCE (RHO1,C,EVEC), (RHO,EVAL,ITIE)                        SR1  68 
C                                                                       SR1  69 
C     SUBROUTINES NEEDED=SORT,EIGEN,PLOT, AND MXOUT                     SR1  70 
C                                                                       SR1  71 
C     TAPE ASSIGNMENTS                                                  SR1  72 
      ITAPE=5                                                           SR1  73 
      JTAPE=6                                                           SR1  74 
      MD=80                                                             SR1  75 
      ND=11                                                             SR1  76 
C     INPUT TITLE, PARAMETERS, AND FORMAT                               SR1  77 
1     READ (ITAPE,129)                                                  SR1  78 
      READ (ITAPE,130) NS,NV,MIND,MAXD,ISIM,IFD,IFC,IFCB                SR1  79 
      READ (ITAPE,141) (FMT(J),J=1,18)                                  SR1  80 
C     INITIALIZE                                                        SR1  81 
      NSP1=NS+1                                                         SR1  82 
      NSM1=NS-1                                                         SR1  83 
      FNV=NV                                                            SR1  84 
      FNS=NS                                                            SR1  85 
      NSPNV=NS+NV                                                       SR1  86 
      NSNVM1=NSPNV-1                                                    SR1  87 
      NSNVP1=NSPNV+1                                                    SR1  88 
      FN=NSNVM1                                                         SR1  89 
      FNR=FN+1.                                                         SR1  90 
      NEL=NS*NV                                                         SR1  91 
C     INPUT DATA MATRIX                                                 SR1  92 
      DO 2 I=1,NS                                                       SR1  93 
2     READ (ITAPE,FMT) (RHO(I,J),J=NSP1,NSPNV)                          SR1  94 
C     PRINT INPUT VALUES                                                SR1  95 
      WRITE (JTAPE,129)                                                 SR1  96 
      WRITE (JTAPE,137)                                                 SR1  97 
      DO 3 I=1,NS                                                       SR1  98 
      WRITE (JTAPE,138) I                                               SR1  99 
3     WRITE (JTAPE,139) (RHO(I,J),J=NSP1,NSPNV)                         SR1 100 
      II=0                                                              SR1 101 
      DO 4 I=1,NS                                                       SR1 102 
      DO 4 J=NSP1,NSPNV                                                 SR1 103 
      II=II+1                                                           SR1 104 
      DIST(II)=RHO(I,J)                                                 SR1 105 
4     EVEC(II)=DIST(II)                                                 SR1 106 
C     IT IS HIGHLY DESIRABLE THAT A MACHINE-CODED VERSION OF A SORT SUB-SR1 107 
C     ROUTINE BE CALLED UPON HERE.                                      SR1 108 
      CALL SORT (-1,NEL,DIST,ISIM,INDI)                                 SR1 109 
      S=0.                                                              SR1 110 
      DO 5 J=1,NEL                                                      SR1 111 
      MM=INDI(J)                                                        SR1 112 
      S=S+1.                                                            SR1 113 
5     DIST(MM)=S                                                        SR1 114 
C     CHECK FOR TIES                                                    SR1 115 
      NOTIES(1)=0                                                       SR1 116 
      J=1                                                               SR1 117 
      II=-1                                                             SR1 118 
      K=J                                                               SR1 119 
      NT=0                                                              SR1 120 
6     LL=1                                                              SR1 121 
      MM=INDI(J)                                                        SR1 122 
      D1=DIST(MM)                                                       SR1 123 
7     K=K+1                                                             SR1 124 
      NN=INDI(K)                                                        SR1 125 
      IF (EVEC(MM)-EVEC(NN)) 9,8,9                                      SR1 126 
8     LL=LL+1                                                           SR1 127 
      D1=D1+DIST(NN)                                                    SR1 128 
      IF (K-NEL) 7,10,10                                                SR1 129 
9     IF (LL-2) 12,10,10                                                SR1 130 
10    II=II+2                                                           SR1 131 
      NT=NT+2                                                           SR1 132 
      NOTIES(II)=LL                                                     SR1 133 
      NOTIES(II+1)=J                                                    SR1 134 
      D1=D1/FLOAT(LL)                                                   SR1 135 
      JJ=J                                                              SR1 136 
      DO 11 KK=1,LL                                                     SR1 137 
      MM=INDI(JJ)                                                       SR1 138 
      DIST(MM)=D1                                                       SR1 139 
11    JJ=JJ+1                                                           SR1 140 
12    J=K                                                               SR1 141 
      IF (J-NEL) 6,13,13                                                SR1 142 
13    ASSIGN 41 TO N1                                                   SR1 143 
C     PREPARE MATRIX TO OBTAIN INITIAL CONFIGURATION                    SR1 144 
      FNEL=(FNR*FN)/2.                                                  SR1 145 
      A=NEL+1                                                           SR1 146 
      A=(A+FNEL)/(2.*FNEL)                                              SR1 147 
      II=0                                                              SR1 148 
      DO 14 I=1,NS                                                      SR1 149 
      DO 14 J=NSP1,NSPNV                                                SR1 150 
      II=II+1                                                           SR1 151 
      RHO1(I,J)=DIST(II)/FNEL                                           SR1 152 
14    RHO1(J,I)=RHO1(I,J)                                               SR1 153 
      DO 15 I=1,NSM1                                                    SR1 154 
      IP1=I+1                                                           SR1 155 
      DO 15 J=IP1,NS                                                    SR1 156 
      RHO1(I,J)=A                                                       SR1 157 
15    RHO1(J,I)=A                                                       SR1 158 
      DO 16 I=NSP1,NSNVM1                                               SR1 159 
      IP1=I+1                                                           SR1 160 
      DO 16 J=IP1,NSPNV                                                 SR1 161 
      RHO1(I,J)=A                                                       SR1 162 
16    RHO1(J,I)=A                                                       SR1 163 
      DO 19 I=1,NSPNV                                                   SR1 164 
      RHO1(I,I)=1.                                                      SR1 165 
      DO 18 J=1,NSPNV                                                   SR1 166 
      IF (I-J) 17,18,17                                                 SR1 167 
17    RHO1(I,I)=RHO1(I,I)+RHO1(I,J)                                     SR1 168 
18    CONTINUE                                                          SR1 169 
19    CONTINUE                                                          SR1 170 
      DO 20 I=1,NSNVM1                                                  SR1 171 
      IP1=I+1                                                           SR1 172 
      DO 20 J=IP1,NSPNV                                                 SR1 173 
      RHO1(I,J)=1.-RHO1(I,J)                                            SR1 174 
20    RHO1(J,I)=RHO1(I,J)                                               SR1 175 
C     OBTAIN INITIAL CONFIGURATION                                      SR1 176 
      KK=MAXD+1                                                         SR1 177 
C     CALL ON HOUSEHOLDER SUBROUTINE                                    SR1 178 
      CALL EIGEN (C,RHO,NSPNV,PSI1,KK,MD,X(1,1),X(1,4),X(1,5),X(1,6),X(1SR1 179 
     1,7),X(1,8))                                                       SR1 180 
      DO 21 J=2,KK                                                      SR1 181 
      PSI1(J-1)=PSI1(J)                                                 SR1 182 
      DO 21 I=1,NSPNV                                                   SR1 183 
21    X(I,J-1)=RHO(I,J)                                                 SR1 184 
C     INITIALIZE                                                        SR1 185 
      LFACT=1                                                           SR1 186 
      ITER=100                                                          SR1 187 
      PRESTR=1.                                                         SR1 188 
C     DETERMINE WHETHER TO GO UP OR DOWN                                SR1 189 
      IF (MIND) 22,22,29                                                SR1 190 
22    DIM=FNR/2.                                                        SR1 191 
      KK=0                                                              SR1 192 
      DO 24 J=1,MAXD                                                    SR1 193 
      IF (PSI1(J)-DIM) 25,23,23                                         SR1 194 
23    KK=KK+1                                                           SR1 195 
24    CONTINUE                                                          SR1 196 
25    IF (KK) 26,26,27                                                  SR1 197 
26    MAXD=1                                                            SR1 198 
      GO TO 28                                                          SR1 199 
27    MAXD=KK                                                           SR1 200 
28    MIND=MAXD                                                         SR1 201 
      LFACT=0                                                           SR1 202 
      ITER=25                                                           SR1 203 
29    M=MIND-1                                                          SR1 204 
C     BEGIN LEAST-SQUARES-RANK-IMAGES ITERATIONS                        SR1 205 
30    NN=0                                                              SR1 206 
      II=0                                                              SR1 207 
      M=M+1                                                             SR1 208 
      NOT=NOTIES(1)                                                     SR1 209 
31    NN=NN+1                                                           SR1 210 
32    ITCT=0                                                            SR1 211 
C     CALCULATE DISTANCES                                               SR1 212 
33    IF (IFCB) 34,36,34                                                SR1 213 
34    JJ=0                                                              SR1 214 
      DO 35 I=1,NS                                                      SR1 215 
      DO 35 J=NSP1,NSPNV                                                SR1 216 
      JJ=JJ+1                                                           SR1 217 
      DIST(JJ)=0.                                                       SR1 218 
      DO 35 K=1,M                                                       SR1 219 
35    DIST(JJ)=DIST(JJ)+ABS(X(I,K)-X(J,K))                              SR1 220 
      GO TO 39                                                          SR1 221 
36    JJ=0                                                              SR1 222 
      DO 38 I=1,NS                                                      SR1 223 
      DO 38 J=NSP1,NSPNV                                                SR1 224 
      JJ=JJ+1                                                           SR1 225 
      DIST(JJ)=0.                                                       SR1 226 
      DO 37 K=1,M                                                       SR1 227 
37    DIST(JJ)=DIST(JJ)+(X(I,K)-X(J,K))**2                              SR1 228 
38    DIST(JJ)=SQRT(DIST(JJ))                                           SR1 229 
39    IF (ITCT) 40,40,61                                                SR1 230 
40    GO TO N1, (41,42)                                                 SR1 231 
C     *** SEE NOTES ABOVE REGARDING SORT SUBROUTINE.                    SR1 232 
41    CALL SORT (0,0,DIST,0,INDJ)                                       SR1 233 
      ASSIGN 42 TO N1                                                   SR1 234 
      GO TO 43                                                          SR1 235 
C     *** SEE NOTES ABOVE REGARDING SORT SUBROUTINE.                    SR1 236 
42    CALL SORT (1,0,DIST,0,INDJ)                                       SR1 237 
43    IF (NOT) 52,52,44                                                 SR1 238 
C     OPTIMALLY PERMUTE TIES ON FIRST AND LAST ITERATION                SR1 239 
44    NOT=0                                                             SR1 240 
      DO 51 J=1,NT,2                                                    SR1 241 
      KK=NOTIES(J)                                                      SR1 242 
      LL=NOTIES(J+1)                                                    SR1 243 
      JJ=LL                                                             SR1 244 
      DO 45 K=1,KK                                                      SR1 245 
      MM=INDI(JJ)                                                       SR1 246 
      EVEC(K)=DIST(MM)                                                  SR1 247 
      ITIE(K)=MM                                                        SR1 248 
45    JJ=JJ+1                                                           SR1 249 
      MM=KK-1                                                           SR1 250 
46    KM1=0                                                             SR1 251 
      DO 48 I=1,MM                                                      SR1 252 
      IP1=I+1                                                           SR1 253 
      DO 48 K=IP1,KK                                                    SR1 254 
      IF (EVEC(K)-EVEC(I)) 47,48,48                                     SR1 255 
47    BIGA=EVEC(I)                                                      SR1 256 
      EVEC(I)=EVEC(K)                                                   SR1 257 
      EVEC(K)=BIGA                                                      SR1 258 
      KM1=1                                                             SR1 259 
      JJ=ITIE(I)                                                        SR1 260 
      ITIE(I)=ITIE(K)                                                   SR1 261 
      ITIE(K)=JJ                                                        SR1 262 
48    CONTINUE                                                          SR1 263 
      IF (KM1) 49,49,46                                                 SR1 264 
49    JJ=LL                                                             SR1 265 
      DO 50 K=1,KK                                                      SR1 266 
      INDI(JJ)=ITIE(K)                                                  SR1 267 
50    JJ=JJ+1                                                           SR1 268 
51    CONTINUE                                                          SR1 269 
C     RANK-IMAGE PERMUTATIONS                                           SR1 270 
52    DO 53 I=1,NEL                                                     SR1 271 
      JJ=INDI(I)                                                        SR1 272 
      KK=INDJ(I)                                                        SR1 273 
53    EVAL(JJ)=DIST(KK)                                                 SR1 274 
C     COMPUTE NORMALIZED PHI                                            SR1 275 
      STRESS=0.                                                         SR1 276 
      D1=0.                                                             SR1 277 
      DO 54 I=1,NEL                                                     SR1 278 
      D1=D1+DIST(I)**2                                                  SR1 279 
54    STRESS=STRESS+(DIST(I)-EVAL(I))**2                                SR1 280 
      STRESS=STRESS/(2.*D1)                                             SR1 281 
      IF (II) 55,55,89                                                  SR1 282 
55    PSI1(NN)=STRESS                                                   SR1 283 
      IF (NN-1) 61,61,56                                                SR1 284 
56    IF (NOTIES(1)) 61,61,57                                           SR1 285 
C     TIE TIES                                                          SR1 286 
57    DO 60 J=1,NT,2                                                    SR1 287 
      KK=NOTIES(J)                                                      SR1 288 
      LL=NOTIES(J+1)                                                    SR1 289 
      JJ=LL                                                             SR1 290 
      D1=0.                                                             SR1 291 
      DO 58 K=1,KK                                                      SR1 292 
      MM=INDI(JJ)                                                       SR1 293 
      D1=D1+EVAL(MM)                                                    SR1 294 
58    JJ=JJ+1                                                           SR1 295 
      JJ=LL                                                             SR1 296 
      D1=D1/FLOAT(KK)                                                   SR1 297 
      DO 59 L=1,KK                                                      SR1 298 
      MM=INDI(JJ)                                                       SR1 299 
      EVAL(MM)=D1                                                       SR1 300 
59    JJ=JJ+1                                                           SR1 301 
60    CONTINUE                                                          SR1 302 
C     TEST FOR ZERO DISTANCE                                            SR1 303 
61    JJ=INDJ(1)                                                        SR1 304 
      IF (DIST(JJ)) 65,62,65                                            SR1 305 
62    DO 63 J=2,NEL                                                     SR1 306 
      JJ=INDJ(J)                                                        SR1 307 
      IF (DIST(JJ)) 64,63,64                                            SR1 308 
63    CONTINUE                                                          SR1 309 
64    MM=INDJ(NEL)                                                      SR1 310 
      GL=DIST(MM)/DIST(JJ)                                              SR1 311 
      GO TO 66                                                          SR1 312 
65    GL=0.                                                             SR1 313 
66    JJ=0                                                              SR1 314 
      DO 72 I=1,NS                                                      SR1 315 
      DO 72 J=NSP1,NSPNV                                                SR1 316 
      JJ=JJ+1                                                           SR1 317 
      IF (GL) 67,71,67                                                  SR1 318 
67    IF (EVAL(JJ)+DIST(JJ)) 69,68,69                                   SR1 319 
68    C(J,I)=1.                                                         SR1 320 
      GO TO 72                                                          SR1 321 
69    IF (DIST(JJ)) 71,70,71                                            SR1 322 
70    C(J,I)=GL                                                         SR1 323 
      GO TO 72                                                          SR1 324 
71    C(J,I)=EVAL(JJ)/DIST(JJ)                                          SR1 325 
72    CONTINUE                                                          SR1 326 
C     PREPARE CORRECTION MATRIX                                         SR1 327 
      DO 73 I=NSP1,NSPNV                                                SR1 328 
      C(I,I)=FNV                                                        SR1 329 
      DO 73 J=1,NS                                                      SR1 330 
73    C(I,I)=C(I,I)+C(I,J)                                              SR1 331 
      DO 74 J=1,NS                                                      SR1 332 
      C(J,J)=FNS                                                        SR1 333 
      DO 74 I=NSP1,NSPNV                                                SR1 334 
74    C(J,J)=C(J,J)+C(I,J)                                              SR1 335 
      DO 75 I=NSP1,NSPNV                                                SR1 336 
      DO 75 J=1,NS                                                      SR1 337 
75    C(I,J)=1.-C(I,J)                                                  SR1 338 
C     APPLY CORRECTIONS                                                 SR1 339 
      DO 77 K=1,M                                                       SR1 340 
      DO 77 I=1,NS                                                      SR1 341 
      X1(I,K)=X(I,K)*C(I,I)                                             SR1 342 
      DO 76 J=NSP1,NSPNV                                                SR1 343 
76    X1(I,K)=X1(I,K)+X(J,K)*C(J,I)                                     SR1 344 
77    X1(I,K)=X1(I,K)/FNR                                               SR1 345 
      DO 79 K=1,M                                                       SR1 346 
      DO 79 I=NSP1,NSPNV                                                SR1 347 
      X1(I,K)=X(I,K)*C(I,I)                                             SR1 348 
      DO 78 J=1,NS                                                      SR1 349 
78    X1(I,K)=X1(I,K)+X(J,K)*C(I,J)                                     SR1 350 
79    X1(I,K)=X1(I,K)/FNR                                               SR1 351 
      DO 80 K=1,M                                                       SR1 352 
      DO 80 I=1,NSPNV                                                   SR1 353 
80    X(I,K)=X1(I,K)                                                    SR1 354 
      ITCT=ITCT+1                                                       SR1 355 
C     TEST FOR TERMINATION                                              SR1 356 
      IF (10-ITCT) 81,81,33                                             SR1 357 
81    IF (STRESS-.000001) 85,85,82                                      SR1 358 
82    IF (NN-6) 31,83,83                                                SR1 359 
83    IF (PSI1(NN-5)-PSI1(NN)-1E-06) 85,85,84                           SR1 360 
84    IF (NN-ITER) 31,85,85                                             SR1 361 
85    IF (LFACT) 88,88,86                                               SR1 362 
86    IF (PRESTR-STRESS) 1,1,87                                         SR1 363 
87    PRESTR=STRESS                                                     SR1 364 
88    WRITE (JTAPE,129)                                                 SR1 365 
      WRITE (JTAPE,131) M,(MM,MM=1,M)                                   SR1 366 
      WRITE (JTAPE,132)                                                 SR1 367 
      II=1                                                              SR1 368 
      NOT=NOTIES(1)                                                     SR1 369 
      GO TO 32                                                          SR1 370 
89    IF (M-2) 95,90,90                                                 SR1 371 
90    IF (IFCB) 95,91,95                                                SR1 372 
C     PERFORM PRINCIPAL AXIS ROTATION                                   SR1 373 
91    DO 93 I=1,NSPNV                                                   SR1 374 
      DO 93 J=I,NSPNV                                                   SR1 375 
      C(I,J)=0.                                                         SR1 376 
      DO 92 K=1,M                                                       SR1 377 
92    C(I,J)=C(I,J)+X(I,K)*X(J,K)                                       SR1 378 
93    C(J,I)=C(I,J)                                                     SR1 379 
C     CALL ON HOUSEHOLDER                                               SR1 380 
      CALL EIGEN (C,RHO,NSPNV,PSI1,M,MD,DIST(1),DIST(241),DIST(321),DISTSR1 381 
     1(401),DIST(481),DIST(561))                                        SR1 382 
      DO 94 J=1,M                                                       SR1 383 
      DO 94 I=1,NSPNV                                                   SR1 384 
94    X(I,J)=RHO(I,J)                                                   SR1 385 
C     NORMALIZE COORDINATES TO LIE IN RANGE -1 TO +1                    SR1 386 
95    A=0.                                                              SR1 387 
      DO 97 K=1,M                                                       SR1 388 
      C(1,K)=X(1,K)                                                     SR1 389 
      C(2,K)=X(1,K)                                                     SR1 390 
      DO 96 I=2,NSPNV                                                   SR1 391 
      C(1,K)=AMIN1(C(1,K),X(I,K))                                       SR1 392 
96    C(2,K)=AMAX1(C(2,K),X(I,K))                                       SR1 393 
97    A=AMAX1(A,(C(2,K)-C(1,K)))                                        SR1 394 
      A=2./A                                                            SR1 395 
      DO 98 K=1,M                                                       SR1 396 
      DO 98 I=1,NSPNV                                                   SR1 397 
98    X1(I,K)=A*(X(I,K)-C(1,K))-1.                                      SR1 398 
C     COMPUTE CENTRALITY INDEX                                          SR1 399 
      MM=M+1                                                            SR1 400 
      DO 102 I=1,NSPNV                                                  SR1 401 
      X1(I,MM)=0.                                                       SR1 402 
      DO 99 K=1,M                                                       SR1 403 
99    X1(I,MM)=X1(I,MM)+X(I,K)**2                                       SR1 404 
      IF (IFCB) 100,101,100                                             SR1 405 
100   X1(I,MM)=A*X1(I,MM)                                               SR1 406 
      GO TO 102                                                         SR1 407 
101   X1(I,MM)=A*SQRT(X1(I,MM))                                         SR1 408 
102   CONTINUE                                                          SR1 409 
C     PRINT RESULTS                                                     SR1 410 
      DO 103 I=1,NS                                                     SR1 411 
103   WRITE (JTAPE,133) I,(X1(I,K),K=1,MM)                              SR1 412 
      WRITE (JTAPE,140)                                                 SR1 413 
      DO 104 I=NSP1,NSPNV                                               SR1 414 
104   WRITE (JTAPE,133) I,(X1(I,K),K=1,MM)                              SR1 415 
      A=1.-STRESS                                                       SR1 416 
      CAL=SQRT(1.-A**2)                                                 SR1 417 
      WRITE (JTAPE,134) STRESS,NN,CAL                                   SR1 418 
      IF (LFACT) 105,117,105                                            SR1 419 
105   IF (M-2) 127,106,106                                              SR1 420 
C     CALL PLOT SUBROUTINE                                              SR1 421 
106   CALL PLOT (X1,C(1,1),C(1,2),C(1,3),C(1,4),C(1,5),NSPNV,M,MD,ND)   SR1 422 
      IF (IFC) 107,109,107                                              SR1 423 
107   DO 108 I=1,NSPNV                                                  SR1 424 
108   PUNCH 136, (X1(I,J),J=1,M)                                        SR1 425 
109   IF (IFD) 110,127,110                                              SR1 426 
110   IF (IFCB) 114,111,114                                             SR1 427 
111   DO 113 I=1,NSNVM1                                                 SR1 428 
      C(I,I)=0.                                                         SR1 429 
      IP1=I+1                                                           SR1 430 
      DO 113 J=IP1,NSPNV                                                SR1 431 
      C(J,I)=0.                                                         SR1 432 
      DO 112 K=1,M                                                      SR1 433 
112   C(J,I)=C(J,I)+(X1(I,K)-X1(J,K))**2                                SR1 434 
113   C(J,I)=SQRT(C(J,I))                                               SR1 435 
      GO TO 116                                                         SR1 436 
114   DO 115 I=1,NSNVM1                                                 SR1 437 
      C(I,I)=0.                                                         SR1 438 
      IP1=I+1                                                           SR1 439 
      DO 115 J=IP1,NSPNV                                                SR1 440 
      C(J,I)=0.                                                         SR1 441 
      DO 115 K=1,M                                                      SR1 442 
115   C(J,I)=C(J,I)+ABS(X1(I,K)-X1(J,K))                                SR1 443 
116   C(NSPNV,NSPNV)=0.                                                 SR1 444 
      CALL MXOUT (C,NSPNV,1,MD)                                         SR1 445 
      GO TO 127                                                         SR1 446 
117   IF (IFCB) 118,119,118                                             SR1 447 
118   WRITE (JTAPE,135)                                                 SR1 448 
      GO TO 1                                                           SR1 449 
C     DETERMINE HOW MANY DIMENSIONS TO DROP                             SR1 450 
119   KK=1                                                              SR1 451 
      MM=M                                                              SR1 452 
      DO 121 J=2,MM                                                     SR1 453 
      BIGA=PSI1(J)/PSI1(1)                                              SR1 454 
      IF (BIGA-.3) 122,122,120                                          SR1 455 
120   KK=KK+1                                                           SR1 456 
121   CONTINUE                                                          SR1 457 
122   M=KK-1                                                            SR1 458 
      MAXD=KK                                                           SR1 459 
      IF (ITER-100) 123,124,124                                         SR1 460 
123   ITER=ITER+25                                                      SR1 461 
124   IF (MM-KK) 125,125,30                                             SR1 462 
125   LFACT=1                                                           SR1 463 
      IF (M) 1,1,126                                                    SR1 464 
126   M=M+1                                                             SR1 465 
      GO TO 106                                                         SR1 466 
127   IF (.000001-STRESS) 128,1,1                                       SR1 467 
128   IF (M-MAXD) 30,1,1                                                SR1 468 
C     *** FORMAT STATEMENTS ***                                         SR1 469 
C                                                                       SR1 470 
129   FORMAT (72H                                                       SR1 471 
     1                 )                                                SR1 472 
130   FORMAT (8I4)                                                      SR1 473 
131   FORMAT (32H0G-L(SSAR-I) COORDINATES FOR M =,I3,1H./10H0DIMENSION,1SR1 474 
     10I10)                                                             SR1 475 
132   FORMAT (1H ,130(1H-)/6H0  ROW)                                    SR1 476 
133   FORMAT (I5,5X2P11F10.3)                                           SR1 477 
134   FORMAT (17H0NORMALIZED PHI =,F7.5,4H FOR,I4,11H ITERATIONS/28H COESR1 478 
     1FFICIENT OF ALIENATION =,E12.6)                                   SR1 479 
135   FORMAT (27H0ERROR - IFCB=1 AND MIND=0.)                           SR1 480 
136   FORMAT (9F8.5)                                                    SR1 481 
137   FORMAT (19H0INPUT COEFFICIENTS)                                   SR1 482 
138   FORMAT (4H0ROW,I3)                                                SR1 483 
139   FORMAT (10F13.4)                                                  SR1 484 
140   FORMAT (8H0 COLUMN)                                               SR1 485 
141   FORMAT (18A4)                                                     SR1 486 
      END                                                               SR1 487-
14 POINTS IN TWO DIMENSIONS - COOMB'S (INPUT BY COLUMNS).                       
   4  18   2   3                                                                
(18F1.0)                                                                        
141414233232111223                                                              
232332141423344434                                                              
324141322314223111                                                              
413223414141432342                                                              
1NONMETRIC ANALYSIS OF TWIN DATA BASED ON A MULTIFACETED DESIGN - A.            
  48  10       6   1   1                                                        
(9X10F3.1)                                                                      
 09150   48 50 49 52 46 49 53 45 51 53                                          
 09151   46 49 52 51 49 47 40 61 38 47                                          
 09890   55 58 56 51 54 60 53 42 40 40                                          
 09891   61 58 64 64 61 61 48 37 51 43                                          
 10310   48 62 55 60 49 59 43 40 43 43                                          
 10311   56 61 55 53 57 43 48 46 40 46                                          
 11010   54 43 55 38 55 44 52 70 39 58                                          
 11011   56 36 47 36 49 50 46 58 56 43                                          
 06610   61 67 61 73 58 48 49 38 28 39                                          
 06611   59 67 55 65 50 55 54 43 51 42                                          
 10090   42 50 26 41 45 40 58 36 59 48                                          
 10091   49 47 47 46 45 49 43 44 57 38                                          
 10790   64 70 63 69 52 48 55 39 56 40                                          
 10791   65 60 63 53 47 58 39 57 56 35                                          
 13030   62 56 63 60 45 56 46 51 48 55                                          
 13031   67 50 56 48 50 61 48 45 53 58                                          
 08970   42 36 36 35 45 33 56 39 73 57                                          
 08971   44 45 46 47 51 38 61 48 50 61                                          
 09010   56 55 55 61 68 44 66 63 48 54                                          
 09011   61 62 61 65 77 52 54 44 47 52                                          
 09070   47 54 50 49 41 61 37 58 61 50                                          
 09071   60 45 52 40 49 48 45 67 57 49                                          
 09110   41 29 31 39 47 55 39 40 59 63                                          
 09111   34 48 37 34 49 61 56 37 47 54                                          
 09090   63 55 57 60 59 43 52 57 42 48                                          
 09091   42 54 63 51 55 51 32 46 48 41                                          
 09210   52 51 44 59 21 62 57 43 62 50                                          
 09211   45 44 48 49 21 46 40 53 46 44                                          
 09710   40 42 44 34 50 49 60 68 67 63                                          
 09711   61 57 64 55 55 33 71 56 56 49                                          
 09730   35 37 26 35 46 58 48 51 54 40                                          
 09731   50 45 52 37 50 74 32 54 44 41                                          
 12091   46 41 38 44 49 60 68 41 74 60                                          
 12090   52 61 47 53 52 54 44 33 42 57                                          
 12170   62 57 53 55 21 44 57 58 41 56                                          
 12171   47 63 61 60 61 40 54 52 41 52                                          
 12270   62 55 60 53 45 55 36 63 46 45                                          
 12271   62 43 57 62 53 42 40 64 52 50                                          
 12410   53 60 48 49 58 47 50 59 61 40                                          
 12411   46 58 48 55 57 46 45 54 34 48                                          
 12431   47 38 47 46 50 56 55 45 51 46                                          
 12430   38 39 36 40 51 48 47 37 34 42                                          
 12530   46 30 42 39 51 48 61 55 66 61                                          
 12531   27 38 33 40 49 58 55 49 54 59                                          
 12770   34 38 49 45 42 27 80 65 49 56                                          
 12771   34 41 43 41 49 53 40 64 52 47                                          
 12791   35 51 56 53 59 21 50 44 44 44                                          
 12790   45 44 46 51 58 65 37 43 34 95                                          
